Archive | EN Java

[Java Swing] JMenu in Java

The writing on the JMenu however find all this code, it is sufficient, explain the relatively clear. First we need to add a MenuBar in JFrame, JMenu then added to the MenuBar, the JMenuItem be added to the JMenu. The program includes JPopupmenu (right click). Also you need to have the image of the icon in the menu, copy the image into […]

[Java] Check the number of elements in Java

Video below will guide you to enter a number and check if it is prime or not. Do không có micro nên nó hơi ồn các bạn cố gắng vậy 😀 Video thứ 2 This will test and generate prime numbers in an array

[Java] Round Robin simulation strategy management process

Strategy Round Robin is one of the strategic management, coordination process. The following will simulate the workings of this strategy. Upper right panel allows the process to enter the turnaround time (Round robin – Import 1 time), name of progress, Time to, running time of the CPU. Upper right panel will show the progress […]

[Java swing] Customize JTabbedPane

In my previous article introduced some basic JTabbenPane, this article we learn a little more for better customization for too JTabbedPane, like the picture below, have closed tab, More tab,… In which the most important is how we have to add new tab button, how each tab it close button tab. We will create 2 file, 1 […]

[Java swing] JTabbedPane in Java

You have to use the notepad or you are using eclipse, NetBean to java code and you can see we have many different tab. This article we will learn JTabbedPane, a component that allows you to create multiple tabs so. Create simple JTabbedPane Consider the following code to do simple demo shown above, in your code has relatively clear explanation. Beneath its code […]

[JavaSwing] JTextArea in Java

JTextArea is a component for displaying multiple lines of text at the same time the user can edit the text. Create a simple JTextArea Now we will practice even an example that allows you to type and edit text. In your code, and images were explained quite clearly the commands performed with JTextArea. Set the font and font color for you JTextArea […]

[Java – C] C function calls in Java – Call C function in Java

Have you ever wanted to write a Java program library but not like some languages (such as C) to perform? That is one reason for you to read this article, or some other reason do you want to use functions from C to Java programs you can run faster! To do this, you should use the letter […]

[Java] The simulation program collage file

Sometimes our files too large but need to share to friends, it makes sharing data difficult. The best workaround is let's cut the file into smaller files and some then take it back when down on graft. The following programs simulate job cut and join files. Interface splitter includes […]

[Java Swing] JPasswordField in Java – JPasswordField in Java

Content Create JPasswordField Getting the facts and get the password from JPasswordField JPasswordField object allows us to enter into a line of text like JTextField but is hidden by asterisks (*) or dots to create a password (password). JPasswordField JTextField often used together to create a user name and password pairs as shown below: Now we'll go through JPasswordField […]

[Java Swing] JRadioButton in Java – JRadioButton in java

Content Creating Order JRadioButton JRadioButton in group events for JRadioButton JRadioButton Getting an object allows us to choose the attributes brittle as JCheckBox. However, we tend to use JRadioButton when the user wants to select only one of the attributes. For example, users choose the sex was just selected as M or F. How to create JRadioButton – How to create JRadioButton Để […]