# Exercise 5: Finishing the Layout

In this exercise, you will name each button and edit its text. You will then preview how the layout will look in the application.

1. 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.
2. Open the attribute editor; then type `b7` in the name box.
3. In the text box, type `7` and click Apply.
   The button label changes from "button" to "7".
4. 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		=

5. 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.

6. Change back to the Edit mode by choosing Edit from the Mode list.
7. Choose GUI -> Save Generate.
   The path name of the saved file appears in the footer.

Next lesson:

  Exercise 6: Adding Code