The Java programming language contains a library aimed at helping developers produce graphical user interfaces. This library is called Java Swing, and the NetBeans Integrated Development environment features a graphical editor for making Java Swing applications. You can use Java Swing to place "Combo Boxes" on an application. These boxes contain lists of items that can be selected from, and they are common on websites that ask for a country of origin. Sometimes you will find yourself with too many items in a "Combo Box." Luckily, you can easily disable any items held by the "Combo Box" using NetBeans.
- 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" followed by New Project." Select "Java Desktop Application" from the list on the right-hand side of the screen. A new application window appears in the NetBeans visual editor window. To the right of this window, there is a toolbox pane labelled "Palette."
Click on the item labelled "Combo Box" from the "Palette" toolbox.
Move your mouse pointer over the empty application window. A "Combo Box" item will appear beneath your mouse pointer. Click the pointer to place the "Combo Box" anywhere within the application window.
Right-click the "Combo Box," and then select "Properties" from the context menu that appears. A "Properties" window will appear.
Locate the field labelled "Models" in the "Properties" window. This field contains all of the items enabled for this "Combo Box."
Click on the button marked with an ellipsis. A window containing a list of all the items held by the "Combo Box" appears.
Click on the item you wish to remove. Delete it by pressing the "Delete" or "Backspace" key.
Press the "OK" button to save your changes and exit the window.
Press the "F6" key to execute the program. An application window containing a "Combo Box" appears. Click on the "Combo Box" to reveal its menu of items. The item you removed is no longer present.
- 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