Example usage for java.awt.event ActionListener interface-usage

List of usage examples for java.awt.event ActionListener interface-usage

Introduction

In this page you can find the example usage for java.awt.event ActionListener interface-usage.

Usage

From source file Main.java

public class Main extends JPanel implements ActionListener {
    ImageIcon images[];
    int totalImages = 30, currentImage = 0, animationDelay = 50;
    Timer animationTimer;

    public Main() {

From source file ContextMenu.java

public class ContextMenu implements ActionListener {
    JTextArea textArea = new JTextArea();

    public ContextMenu() {
        final JPopupMenu contextMenu = new JPopupMenu("Edit");
        contextMenu.add(makeMenuItem("Save"));

From source file FadeOutImage.java

public class FadeOutImage extends JPanel implements ActionListener {
    Image myImage = new ImageIcon("a.jpg").getImage();

    Timer timer = new Timer(20, this);

    private float alpha = 1f;

From source file Main.java

public class Main implements Runnable, ActionListener {
    JDialog dialog = new JDialog();
    int number = 0;
    JLabel message = new JLabel();
    JButton yes = new JButton("OK"), no = new JButton("Cancel");;
    String messageStr = "number";;

From source file Main.java

public class Main extends JPanel implements ActionListener {

    private JButton yellowButton = new JButton("Yellow");

    private JButton blueButton = new JButton("Blue");

From source file SwingTimerBasedAnimationScaleRotate.java

public class SwingTimerBasedAnimationScaleRotate extends JPanel implements ActionListener {
    Timer timer;
    private double angle = 0;
    private double scale = 1;
    private double delta = 0.01;
    Rectangle.Float r = new Rectangle.Float(20, 20, 200, 200);

From source file CheckBoxDemo.java

public class CheckBoxDemo extends JFrame implements ActionListener {

    JLabel fontLabel = new JLabel("The quick brown fox jumps over the lazy dog.");

    private JCheckBox bold = new JCheckBox("Bold");

From source file Main.java

public class Main extends JFrame implements ActionListener {
    Image img;

    JButton getPictureButton = new JButton("Get Picture");

    public static void main(String[] args) {

From source file DualListener.java

class DualListener implements ActionListener, ChangeListener {
    public void actionPerformed(ActionEvent e) {
        System.out.println("dual: Action " + e);
    }

    public void stateChanged(ChangeEvent e) {

From source file Main.java

public class Main extends JFrame implements ActionListener {
    Image img;

    JButton getPictureButton = new JButton("Get Picture");

    public static void main(String[] args) {