When we added the JFrame container, the IDE opened the newly-created ContactEditorUI form in an Editor tab with a toolbar containing several buttons, as shown in the preceding illustration. To explore the GUI Builder interface with an interactive demo, click the View Demo icon. Now that we've set up a new project for our application, let's take a minute to familiarize ourselves with the GUI Builder's interface. Notice that the my.contacteditor package replaces the default package. The IDE creates the ContactEditorUI form and the ContactEditorUI class within the ContactEditorUI.java application and opens the ContactEditorUI form in the GUI Builder. In the Projects window, right-click the ContactEditor node and choose New > JFrame Form. In this step we'll create a container using the JFrame component and place the container in a new package. To proceed with building our interface, we need to create a Java container within which we will place the other required GUI components. To view the project structure, use the IDE's Files window as shown below (Some files and folders are available after the project has been built).Īfter creating the new application, you may have noticed that the Source Packages folder in the Projects window contains an empty node. This folder contains all of the project's associated files, including its Ant script, folders for storing sources and tests, and a folder for project-specific metadata. The IDE creates the ContactEditor folder on your system in the designated location. Click Next.Įnter ContactEditor in the Project Name field and specify the project location.Įnsure that the Set as Main Project checkbox is selected and clear the Create Main Class field. In the Categories pane, select the Java node and in the Projects pane, choose Java Application. Alternately, you can click the New Project icon in the IDE toolbar. To create a new ContactEditor application project:Ĭhoose File > New Project. While Java applications often consist of several IDE projects, for the purposes of this tutorial, we will build a simple application which is stored entirely in a single project. An IDE project is a group of Java source files plus its associated meta data, including project-specific properties files, an Ant build script that controls the build and run settings, and a project.xml file that maps Ant targets to IDE commands. You can lay out your forms by simply placing components where you want them.īecause all Java development in the IDE takes place within projects, we first need to create a new ContactEditor project within which to store sources and other project files. ![]() The IDE's GUI Builder makes it possible to build professional-looking GUIs without an intimate understanding of layout managers. In the process you will layout a GUI front-end that enables you to view and edit contact information of individuals included in an employee database. This tutorial guides you through the process of creating the graphical user interface (GUI) for an application called ContactEditor using the NetBeans IDE GUI Builder. Windows XP Pro SP2 + periodical patches + periodical updates… The machine specifications used in this task: In this tutorial, we will try to build Java desktop application that resembles the following GUI.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |