Jump to content

ShowOptionDialog.java: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
Back to [[Into Java - Part XVIII]]
Back to [[Into Java - Part XVIII]]
<PRE>
<PRE>
import javax.swing.*;
import javax.swing.*;
Line 28: Line 26:
     }
     }
}
}
</PRE>
</PRE>
[[Category:Languages Articles]]

Revision as of 23:20, 13 December 2017

Back to Into Java - Part XVIII

import javax.swing.*;
import java.awt.event.*;
import java.awt.*;

public class ShowOptionDialog extends JFrame {
    public ShowOptionDialog() {
        setTitle("ShowOptionDialog");
        setSize(640, 480);
        setLocation(200, 200);
        OptionPanel opt = new OptionPanel();
        getContentPane().add(opt);

        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        System.setErr(System.out);
    }

    public static void main(String[] args) {
        ShowOptionDialog sod = new ShowOptionDialog();
        sod.show();
    }
}