Quickly develop Java desktop programs with NetBeans (a) New JFrame

Source: Internet
Author: User
Tags netbeans

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.