Package charvax.swing

Examples of charvax.swing.JButton.addActionListener()


        JTextField textfield2 = new JTextField("Text Field 2");
        panel2.add(textfield2);
        textfield2.setLocation(11, 2);

        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        contentPane.add(okButton);
        okButton.setLocation(25, 17);
        okButton.setMnemonic(0x18); // CTRL-X
    }
View Full Code Here


        gbc.fill = GridBagConstraints.HORIZONTAL;
        centerpan.add(new TextAreaPanel(), gbc);

        JPanel southpan = new JPanel();
        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        southpan.add(okButton);

        contentPane.add(centerpan, BorderLayout.CENTER);
        contentPane.add(southpan, BorderLayout.SOUTH);
        pack();
View Full Code Here

        JPanel centerpan = new JListPanel();

        JPanel southpan = new JPanel();
        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        southpan.add(okButton);

        contentPane.add(northpan, BorderLayout.NORTH);
        contentPane.add(centerpan, BorderLayout.CENTER);
        contentPane.add(southpan, BorderLayout.SOUTH);
View Full Code Here

        contentPane.add(makeCenterPanel(), BorderLayout.CENTER);

        JPanel southpan = new JPanel();
        JButton startButton = new JButton("Start Task");
        startButton.addActionListener(this);
        southpan.add(startButton);

        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        southpan.add(okButton);
View Full Code Here

        JButton startButton = new JButton("Start Task");
        startButton.addActionListener(this);
        southpan.add(startButton);

        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        southpan.add(okButton);

        JButton cancelButton = new JButton("Cancel");
        cancelButton.addActionListener(this);
        southpan.add(cancelButton);
View Full Code Here

        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        southpan.add(okButton);

        JButton cancelButton = new JButton("Cancel");
        cancelButton.addActionListener(this);
        southpan.add(cancelButton);

        contentPane.add(southpan, BorderLayout.SOUTH);

        pack();
View Full Code Here

        JPanel southpan = new JPanel();
        southpan.setBorder(new TitledBorder("South Panel"));
        southpan.add(new JLabel("A label in the south: "));
        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        southpan.add(okButton);
        contentPane.add(southpan, BorderLayout.SOUTH);
        okButton.setMnemonic(KeyEvent.VK_F10);
        pack();
    }
View Full Code Here

        southpan.setForeground(Color.white);
        JLabel labelsouth = new JLabel("A green label in the south panel ");
        labelsouth.setForeground(Color.green);
        southpan.add(labelsouth);
        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        southpan.add(okButton);
        contentPane.add(southpan, BorderLayout.SOUTH);
        okButton.setMnemonic(KeyEvent.VK_F10);
        pack();
    }
View Full Code Here

        scrollpane.setViewportBorder(viewportBorder);
        centerpan.add(scrollpane, gbc);

        JPanel southpan = new JPanel();
        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        southpan.add(okButton);

        contentPane.add(centerpan, BorderLayout.CENTER);
        contentPane.add(southpan, BorderLayout.SOUTH);
        pack();
View Full Code Here

        contentPane.add(makeCenterPanel(), BorderLayout.CENTER);

        JPanel southpan = new JPanel();
        JButton okButton = new JButton("OK (F9)");
        okButton.setActionCommand("OK");
        okButton.addActionListener(this);
        southpan.add(okButton);

        contentPane.add(southpan, BorderLayout.SOUTH);

        /*
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.