< Java Swings 
      JFrame
|  | JFrameEx.java import javax.swing.JFrame;
import javax.swing.JLabel;
public class JFrameEx extends JFrame {
    JFrameEx() {
        JLabel label1 = new JLabel("My Label");
        add(label1);
        pack();
        setVisible(true);
    }
    
    public static void main(String args[]) {
        JFrameEx e1 = new JFrameEx();
    }
}
 | 
JOptionPane
JApplet
    This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.