Programming and Problem Solving with Java

(やまだぃちぅ) #1
14.2 H o w D o Y o u W r i t e a n Applet? | 663

inputField = new TextField("Value here");

// Add components
add(label);
add(inputField);
add(button);
add(outLabel);

// Specify a layout manager for the window
setLayout(new GridLayout(4,1));

}
}


Here is a series of screen shots showing the initial window and the results from various
input values.

Free download pdf