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.
In Visual Java, type b7 in the Name field.
In the Text field, type 7 and press Return or Enter. 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 =
Click Preview Mode at the bottom of the Visual Java window. The WorkShop shows you how the layout will look in your application.
Switch back to Layout mode.
Click the Save control on the Visual Java tool bar. The path name of the saved file appears in the Visual Java footer.