Defining the window
public class HelloFrame extends Frame {
public static void main (String args []) {
new HelloFrame("Graphics Example");
public HelloFrame (String label) {
setLayout(new FlowLayout());
// Put some buttons on the window
// Add the canvas to the frame
HelloCanvas canvas = new HelloCanvas();
// size the window to that required