Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to add multiple action listeners java swing

JButton addButton = new JButton( new AbstractAction("add") {
        @Override
        public void actionPerformed( ActionEvent e ) {
            // add Action
        }
    });

    JButton substractButton = new JButton( new AbstractAction("substract") { 
        @Override
        public void actionPerformed( ActionEvent e ) {
            // substract Action
        }
    });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #multiple #action #listeners #java #swing
ADD COMMENT
Topic
Name
6+2 =