The NetBeans Integrated Development Environment (IDE) contains a "What you see is what you get" (WYSIWYG) graphical user interface (GUI) editor for Java applications. Use the NetBeans IDE to drag and drop GUI elements onto the editor to visualise the application as you develop it. This decreases development time for GUI applications and increases your control over their appearance. It is quite easy to use and shouldn't take you too long to get started on GUI application development.
- Skill level:
- Moderately Easy
Other People Are Reading
Things you need
- Java Software Development Kit with NetBeans Integrated Development Environment (IDE) Bundle (see Resource for link)
Load the NetBeans IDE by clicking on its program icon. When the program loads, navigate to "New/New Project" and select "Java Desktop Application" from the list on the right-hand side of the screen. A new GUI application window appears in the NetBeans visual editor window. To the right of this window, there is a toolbox pane labelled "Palette."
Click the item labelled "Button" from the "Palette" toolbox pane.
Move the mouse pointer to the GUI application window. A button will appear under the mouse pointer and track its movements. Click the GUI application window to place the button wherever you like. Once you place the button, the mouse cursor returns to normal.
Double-click the button to open a "Set Action" dialogue box. This box allows you to set the action that occurs when users click the button.
Click the drop-down menu labelled "Action" and select "ShowAboutBox." The text on the button changes to "About." When a user clicks on this button, another window will pop up and display some basic information about this application.
Create another button and open its "Set Action" dialogue by repeating Steps 2 through 4.
Click the drop-down menu labelled "Action" and select "Exit." This changes the button text to "Exit," and when a user clicks on it, the application will close.
Run your application by pressing "F6." A window identical to the one located in the NetBeans visual editor appears. Click on the buttons to experiment with the effects each one has. You now have completed a basic GUI application using NetBeans.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for