java.awt Package
The Abstract Window Tollkit package provides for windows and the various ways of displaying information and interacting with them.
This package is imported by the statement
import java.awt.*
Individual parts of the package can be imported for instance
import java.awt.Button
The following is a list of the methods in this package that you might find useful. The table provides the heading for the method, which provides the name and the parameters needed.
java.awt.BorderLayout | |
---|---|
public BorderLayout (string label) | Creates a new border layout manager |
java.awt.Button | |
public Button (string label) | Creates a button with the label |
public String getLabel () | Returns the label on this button |
java.awt.Canvas | |
public Canvas () | Creates a canvas |
public void paint (Graphics g) | Repaints the canvas. This method is usually overriden by the proogrammer. |
java.awt.Checkbox | |
public Checkbox (String s) | Create a check box with the label s |
public Checkbox (String s, Checkbox Group g, boolean state | Ctreate a check box with the label s, within the check box group g and with initial state. |
public boolean getState () | returns the state of the check box |
java.awt.CheckboxGroup | |
public CheckbpxGroup () | Creates a new check box group to which check boxes can be added |
java.awt.Choice | |
public Choice () | Creates a new choice box group to which choices can be added |
public void addItem (String item) | Add an item to this choice box |
public String getSelectedItem () | Returns the item selected |