nimport javax.swing.*;
npublic class HelloWorldSwing
{
n /**
n * Create the GUI
and show it. For thread safety,
this
n * should be invoked
from the event-dispatching thread.
n */
n private static void createAndShowGUI()
{
n //Make sure we
have nice window decorations.
n
JFrame.setDefaultLookAndFeelDecorated(true);
n //Create and set
up the window.
n JFrame frame = new
JFrame("HelloWorldSwing");
n
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
n //Add the
ubiquitous "Hello World" label
n JLabel label = new
JLabel("Hello World");