Tuesday, February 10, 2009

Wed Feb 11, part one: a whole new world, a whole new program!

OK, before we begin, lets start with making a fresh program. It will be an application GUI, so the bare bones of it will look like this (I will have treeware copies for those who need one):



import java.awt.*;
import java.awt.event.*;

public class FebGui implements ActionListener
{
Frame one;
FebGui( )
{
one = new Frame();
one.setBounds(120,149,400,450);
one.setTitle("Wowsers");
one.setLayout(new FlowLayout());
one.show( );
}//end constructor

public void actionPerformed(ActionEvent e)
{
System.out.println("java lava!");
}


static public void main(String[] args)
{
new FebGui(); //make a new "FebGui" object
}//end main

} //end class

No comments:

Post a Comment