public void run(){
//This reference must be final because it is
// referenced from within an anonymous class
// definition.
final World world = new World(200,300);
//Get a reference to the JFrame object that
// is used to display the World.
JFrame frame = world.getFrame();
//Instantiate a new JButton object and
// add it to the NORTH location in the
// JFrame object.
JButton button = new JButton(
"Click to make a turtle.");
frame.getContentPane().add(
button,BorderLayout.NORTH);
frame.pack();//VERY IMPORTANT
|