Commit c52a5fe0 authored by 9831111's avatar 9831111 🙂

Add mouseAction Action Listener.

parent 1ae28781
......@@ -80,6 +80,28 @@ public class MainFrame extends JFrame {
new SettingFrame();
}
}
class MouseAction extends MouseAdapter {
@Override
public void mouseEntered(MouseEvent e) {
super.mouseEntered(e);
JButton jButton = (JButton) e.getComponent();
jButton.setBackground(Color.GREEN);
jButton.setOpaque(true);
repaint();
revalidate();
}
@Override
public void mouseExited(MouseEvent e) {
super.mouseExited(e);
JButton jButton = (JButton) e.getComponent();
jButton.setBackground(Color.WHITE);
jButton.setOpaque(true);
repaint();
revalidate();
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment