Example usage for javax.swing JFrame subclass-usage

List of usage examples for javax.swing JFrame subclass-usage

Introduction

In this page you can find the example usage for javax.swing JFrame subclass-usage.

Usage

From source file Main.java

public class Main extends JFrame {
    private void ShowDialog() {
        JLabel label = new JLabel("Move mouse here for hand cursor");
        label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        JOptionPane pane = new JOptionPane(label);
        pane.setOptions(new Object[] { "OK" });

From source file Main.java

public class Main extends JFrame implements ActionListener {

    public Main() {
        JCheckBox checkbox = new JCheckBox("Show Title", true);
        checkbox.addActionListener(this);
        add(checkbox);

From source file DropTest14.java

public class DropTest14 extends JFrame {
    JTextArea ta;

    public DropTest14() {
        super("Drop Test 1.4");
        setSize(300, 300);

From source file Main.java

public class Main extends JFrame {
    public Main() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(400, 400);

        JTextArea textArea = new JTextArea("drag it...");

From source file Main.java

public class Main extends JFrame {
    public Main() {
        Box box = new Box(BoxLayout.Y_AXIS);
        add(box);

        JLabel label = new JLabel("I'm centered");

From source file Main.java

public class Main extends JFrame {
    private JFrame frame = new JFrame();

    public Main() {
        frame.setSize(600, 600);
        frame.setDefaultCloseOperation(EXIT_ON_CLOSE);

From source file GridSizeTest.java

public class GridSizeTest extends JFrame {

    public static void main(String[] args) {
        GridSizeTest gst = new GridSizeTest();
        gst.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        gst.pack();

From source file Main.java

public class Main extends JFrame {
    public Main(String name) {
        getContentPane().setLayout(new FlowLayout());
        JLabel labelTwo = new JLabel("www.java2s.com");
        labelTwo.setBorder(BorderFactory.createStrokeBorder(new BasicStroke(0)));

From source file Main.java

public class Main extends JFrame {
    public static void main(String[] args) {
        Main frame = new Main();
        frame.setSize(new Dimension(200, 200));
        frame.add(new Button("Hello World"));

From source file PasswordField.java

public class PasswordField extends JFrame {
    public PasswordField() {
        super("JPasswordField Test");

        getContentPane().setLayout(new FlowLayout());