Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java 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 #actionlistener
ADD COMMENT
Topic
Name
8+1 =