Java Desktop Program GUI programming has been criticized. It seems that people have always thought that Java can not develop a friendly interface. Its rubbish levels seem to remain at the beginning of the graphics operating system. It all seems to be due to the misunderstanding of its "layout manager".
I do not have too many comments on this, but I would like to introduce a Java GUI program that does not need to understand the layout manager. I hope to change some of the beginners ' views.
First, we want to install the latest NetBeans, download the address:
Http://us1.mirror.netbeans.org/download/5_0/fcs/200601251500/netbeans-5_0-windows-zh_CN.exe
If the connection is invalid, go to the official website to find it yourself:
http://www.netbeans.org
This version is the Chinese version, the start is quite fast. After installation, open the IDE, the interface should look like this:
Figure 1.1
1. New Project:
In NetBeans programming is also based on the project, first click on the upper right corner of the file---new project.
Figure 1.2
Select Application, click Next
Figure 1.3
Enter the path and click Finish
Figure 1.4
Start creating: Figure 1.5
Create complete, note changes to the Left Item tab:
Figure 1.6
A project has been created and this is the process of creating a project in NetBeans. When you create another project, select another item in Figure 1.3.
2. Create a new JFrame
In the right-click Source code package, follow the diagram action:
Figure 2.1
After you click the JFrame form:
Figure 2.2
Enter the class name and package name. Click Finish
Figure 2.3
Then you can have a visible GUI programming. All AWT and swing components are on the right side of the palette, and the associated properties and events are on the right side of the property panel. The middle of the panel is to drag and drop the control. First drag and drop a few controls to see the changes in several panels and then take the following course