11.2 Making a button



You just call the Button constructor with the label you want on the button.  The Button is a component, you must override init() to inform the applet a button is added into the applet.  You needn't care about the painting of the buttons.

Case Study: Button1.java


Next Page