Second Java Program
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
///////////////////
// SecondJava.java
//
// javac SecondJava.java
//
// produces SecondJava.class
//
// To execute
// ----------
// java SecondJava
//
//
//
public class SecondJava
{
private JFrame mainFrame;
private JLabel headerLabel;
private JLabel statusLabel;
private JPanel controlPanel;
private void prepareGUI(){
mainFrame = new JFrame("Sandeep's Window");
mainFrame.setSize(400,400);
mainFrame.setVisible(true);
}
public static void main(String[] args){
SecondJava sv = new SecondJava();
sv.prepareGUI();
}
}
No comments:
Post a Comment