The Prob04Runner class begins in Listing 3.
Listing 3. Beginning of the Prob04Runner class. |
---|
class Prob04Runner{ Turtle turtle = null; Picture picture = null; int counter = 0; World world = new World(200,200); JButton button = new JButton("Click Me."); public Prob04Runner(){ //Get a reference to the JFrame object that is used // to display the World. JFrame frame = world.getFrame(); //Add the JButton object to the // SOUTH location in the JFrame object. frame.getContentPane().add(button,BorderLayout.SOUTH); frame.pack(); |
File: av.htm | [Next] | [Prev] |