25% developed

Java Swings/Swing Top Level Containers

From Wikibooks, open books for an open world
Jump to navigation Jump to search

JFrame[edit | edit source]

Computer code JFrameEx.java
import javax.swing.JFrame;
import javax.swing.JLabel;

public class JFrameEx extends JFrame {

    JFrameEx() {
        JLabel label1 = new JLabel("My Label");
    public static void main(String args[]) {
        JFrameEx e1 = new JFrameEx();

JOptionPane[edit | edit source]

JApplet[edit | edit source]