Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java jbutton hover

JButton b = new JButton();
b.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseEntered(java.awt.event.MouseEvent e) {
	JButton j = (JButton) e.getSource();
	j.setBackground(Color.Red);
}
public void mouseExited(java.awt.event.MouseEvent e) {
	JButton j = (JButton) e.getSource();
	j.setBackground(Color.Green);
}
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #jbutton #hover
ADD COMMENT
Topic
Name
9+5 =