Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java button actionlistener

import java.awt.event.ActionListener; //For action listener
import javax.swing.*; //For JButton

// Inside of function or method
JButton button = new JButton();
button.addActionListener(e -> {
	System.out.println("Another way of writing an action listener.");
})
 
PREVIOUS NEXT
Tagged: #java #button #actionlistener
ADD COMMENT
Topic
Name
3+4 =