Java Reference
In-Depth Information
2. In the dialog that appears, name the form WeatherXlet . Place the form in a pack-
age if you like, too. Click Finish.
3. From the Palette pane on the right-hand side, click the JPanel item to drag out
a JPanel control. Inside, place two JLabels and two JTextFields , along with two
JButton controls, so that the form resembles Figure 3-13.
Figure 3-13. Layout of the main form's components
4. Change the fields and buttons and their contents to match Figure 3-14. You can do
this by double-clicking and right-clicking items, or by using the Properties pane
(by default, on the lower-right side of the display).
5. Change the name of jTextField1 to location and the name of jTextField2 to
forecast using the Navigator panel on the lower-left side.
6. Make the two JTextField controls you just renamed neither focusable nor editable
by unticking those attributes in the Properties pane for each item.
7. Now create the Settings panel. In the Projects pane, right-click the Source
Packages item and choose New JPanel Form again.
 
Search WWH ::




Custom Search