01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.admin.common;
05:
06: import java.awt.event.MouseAdapter;
07: import java.awt.event.MouseEvent;
08:
09: /**
10: * A Button that paints its border when the mouse flies over.
11: */
12:
13: public class RolloverButton extends XButton {
14: public RolloverButton() {
15: super ();
16: setBorderPainted(false);
17: addMouseListener(new FlyoverListener());
18: }
19:
20: class FlyoverListener extends MouseAdapter {
21: public void mouseEntered(MouseEvent me) {
22: setBorderPainted(true);
23: }
24:
25: public void mouseExited(MouseEvent me) {
26: setBorderPainted(false);
27: }
28: }
29: }
|