Now append the following two lines to appl1.tcl to create the button.
button .rc.b -text "Press Me to Quit" -command {exit}
pack .rc.b
The first of these lines is a command to create a button within the frame ".rc".
Just like in Unix hierarchical directory structures where each level of the hierarchy is specified by a "/", in Tk the "." is used [Note the analogy between / to denote root directory in Unix and "." to denote topmost window in Tk].
The button is named .rc.b and a unique widget command .rc.b is created by Tk. This command is used to make changes to the button. The creation line also specifies that the button should display the label "Press Me to Quit". The option -command makes Tcl script to execute the option "exit" when the user
clicks on the button with the left mouse button.
The second line packs the button within its parent by default at the top. The result will look like: