In this exercise, you will name each button and edit its text. You will then preview how the layout will look in the application.
Select the button in the first column of the third row of the grid.
Select a button by clicking outside the button but within the cell.
Open the attribute editor; then type b7 in the name box.
In the text box, type 7 and click Apply.
The button label changes from "button" to "7".
Edit the buttons in the remaining cells, assigning the following names and text.
Begin with the button to the right of button 7 and continue from left to right.
Name Text
b8 8
b9 9
plus +
b4 4
b5 5
b6 6
minus -
b1 1
b2 2
b3 3
multiply *
b0 0
plusMinus +/-
decimal .
divide /
clear C
clearEntry CE
equal =
In the Mode list to the right of the GUI builder palette, select Preview.
Java WorkShop shows you how the layout will look in your application.
Change back to the Edit mode by choosing Edit from the Mode list.
Choose GUI -> Save Generate.
The path name of the saved file appears in the footer.