Perpetual Java Program....

Status
Not open for further replies.

turo

Wise, Aged Ars Veteran
178
I am taking an intro to Java class and I just thought that we should do something entertaining. Everyone that wants to add to the post needs to copy the existing code and add //comments of what they'd like to see happen...
thx
Kobayashi

//--------------------------------------------------------------------
// Ars Java Perpetual Program
// Started: 10-24-01
//--------------------------------------------------------------------

public class Ars
{
public static void main (String[] args)
{
System.out.println ("Welcome to the Ars Perpetual Java Program!");
System.out.println ("Please add some code!");
}
}
 

LlamaCebu

Smack-Fu Master, in training
84
code:<HR>
Code:
HelloArsJFrame.java<P>
//Hello Ars?
//I'm too lazy to come up with something creative, so "Hello World" it is.<P>import javax.swing.*;
import java.awt.event.*;<P>
public class HelloArsJFrame extends JFrame
{
     public HelloArsJFrame()
     {
          JLabel helloArsJLabel = new JLabel("Hello, Ars!");<P>          JButton helloArsJButton = new JButton("Ok");<P>           helloArsJButton.addActionListener(new ActionListener()
           {
                public void actionPerformed(ActionEvent ae)
                {
                     HelloArsJFrame.this.dispose();
                }
           });<P>           this.setSize(300, 300);
           this.getContentPane().setLayout(new BorderLayout());
           this.getContentPane().add(helloArsJLabel, "Center");
           this.getContentPane().add(helloArsJButton, "South");
     }<P>
Ars.java<P>//--------------------------------------------------------------------
// Ars Java Perpetual Program
// Started: 10-24-01
//--------------------------------------------------------------------<P>
public class Ars
{
     public static void main (String[] args)
     {
          System.out.println ("Welcome to the Ars Perpetual Java Program!");
          System.out.println ("Please add some code!");<P>          HelloArsJFrame helloArsJFrame = new HelloArsJFrame();
          helloArsJFrame.setVisible(true);
     }
}


I'm tired.. I doubt this would actually compile, but I'm going to get to sleep instead of trying :p
 
Status
Not open for further replies.