Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  Hello.java
Language: JAVA
Code:
import javax.swing.*;

public class Hello
{
     public static void main(String arg[])
{
     JLabel label = new JLabel("Hello World!");
     JFrame frame = new JFrame("Hello");
     frame.add(label);
     frame.setSize (300,300);
     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     frame.setVisible(true);
     frame.setLocationRelativeTo(null);
     frame.toFront();
}
}
Comments: