In the tutorial you will learn how to:
Using the GUI Builder interface
Create a GUI container
Adding components
resizing components
aligning components
Adjust component anchor Spacing
To set the automatic resizing behavior of a component
Edit Component Properties
This tutorial takes approximately 30 minutes to complete.
Note: When you see a diagram, you can click it to view a more detailed interactive explanation of GUI builder related features.
Entry
The IDE's GUI builder makes it possible for users who do not have in-depth knowledge of layout management to create a GUI application with a professional look.
For a visual feedback description of GUI Builder, you can refer to the GUI Builder visual feedback legend.
Create a project
Because all Java development work in the IDE is done with projects, we first create a new Contacteditor project to hold the source code and its project files. An IDE project is a set of Java source code files and associated metadata data that includes project-specific property files, an ant build script to control build and run settings, and an project.xml file that maps ant targets to IDE commands. Although Java applications are often made up of multiple IDE projects, in this tutorial, for the sake of simplicity, we build a simple application that is all stored in a single project.
To begin the process of creating a new Contacteditor Application project:
Select File > New Project. Or you can click the New Project icon on the IDE toolbar.
In the Categories pane, select the Java node, and then from the Projects pane, select Java application. Click Next.
Enter Contacteditor in the Project Name field and specify the path to save the project in Project Location.
Make sure that the check box for the Set as Main Project is selected and clears the selected state of the Create Main Class.
Click Finish.
The IDE creates the Contacteditor folder on your system based on the location you just specified. This folder contains all the project-related files, including the project's ant script, the folder where the source code and the test code are stored, and a folder that is used to hold the project meta data. To view the file structure of your project, click the IDE's Files window.
Create a GUI container after you create a new application, you may have noticed that the source packages folder in the Projects window contains an empty package <default package> node. To start building the user interface, we need to create a Java container to place the other required GUI components. In this step, we will use JFrame to create a container and place it in a new package.