/ A simple Swing application.
import [Link].*;
class SwingDemo
{
SwingDemo()
{
// Create a new JFrame container.
JFrame jfrm = new JFrame("A Simple Swing Application");
// Give the frame an initial size.
[Link](275, 100);
// Terminate the program when the user closes the application.
[Link](JFrame.EXIT_ON_CLOSE);
// Create a text-based label.
JLabel jlab = new JLabel(" Swing means powerful GUIs.");
// Add the label to the content pane.
[Link](jlab);
// Display the frame.
[Link](true);
}
public static void main(String args[])
{
// Create the frame on the event dispatching thread.
[Link](new Runnable()
{
public void run() {
new SwingDemo();
}
});
}
}