|
|
|||||||||||||||||||||||||||||
|
Using ButtonsThis example shows how to use Buttons from Jython. Three buttons should be displayed in the applet below. The complete source code for this example is included below. The init method creates three buttons with the appropriate labels. It also specifies the actions to be performed when the first and third buttons are clicked. These actions are specified using event properties. Finally, this method adds these three buttons to the applet (which is using the default FlowLayout). The enable and disable methods change the states of the buttons as appropriate. Notice that this is done using the enabled property of the Buttons.
|