Example usage for javax.swing JButton subclass-usage

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

Introduction

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

Usage

From source file MyButton.java

class MyButton extends JButton implements ActionListener {

    public MyButton(String text) {
        super.setText(text);
        addActionListener(this);
    }

From source file FancyButton.java

public class FancyButton extends JButton {
    public FancyButton(Icon icon, Icon pressed, Icon rollover) {
        super(icon);
        setFocusPainted(false);
        setRolloverEnabled(true);
        setRolloverIcon(rollover);

From source file ArrowButton.java

/**
 * A button which paints on it one or more scaled arrows in one of the cardinal directions.
 * @author Adrian BER
 */
public class ArrowButton extends JButton {

From source file Main.java

class MyButton extends JButton {
    public void paint(Graphics g) {
        // draw image
        // the draw text
    }
}

From source file org.slage.ui.ToolBarButton.java

/**
 * Defines a graphical button to dock on the ToolBar.
 * TODO: refactor to have-a JButton vs. be-a JButton
 * 
 * @author <a href="mailto:Matt@SQ7.org">Matt Holden</a>
 */

From source file Main.java

class ChessButton extends JButton {
    static int N = 8;

    public ChessButton(int i) {
        super(i / N + "," + i % N);
        this.setOpaque(true);

From source file Clock.java

public class Clock extends JButton implements Customizer, Externalizable, Runnable {

    protected PropertyChangeSupport propertyChangeSupport;

    protected boolean isDigital = false;

From source file Main.java

/**
 * A button which paints on it one or more scaled arrows in one of the cardinal
 * directions.
 * 
 * @author Adrian BER
 */

From source file dk.sdu.mmmi.featureous.questionnaire.SubmitButton.java

/**
 *
 * @author ao
 */
public class SubmitButton extends JButton {

From source file ToolBarButton.java

/**
 * ToolBar button.
 * 
 * @author Frederik Dietz
 */
@SuppressWarnings("serial")