Other |
---|
5.0 tigerFixed |
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
Name: el35337 Date: 06/11/98 ========== to reproduce ======== - compile single source file included below - run application: java TipTest - when app window appears, position another application (e.g. Win95 calculator) so that it is active, and partially obscures the TipTest app window, like this: ..................... | TipTest | | ................. | * | | | Calculator ................| (or other app) | ................. - position the mouse (hover over but do NOT click) somewhere to the left of the calculator app. (approx. in area marked by the '*' character above). At this point, the calculator app should STILL be the active window. ====== the bugs ================ BUG A as you rest the mouse cursor over the area shown above, the ToolTip will appear, even though the TipTest window/app is inactive. This seems wrong. The TipTest app/window should NOT be processing mouse events (until the window is made active again). For an example of standard Windows behavior, look at Netscape Communicator toolbar. When another app is active in front of Communicator, Communicator's toolbar buttons ignore mouse "rollover" events. BUG B Bug B happens because of Bug A. With the mouse cursor resting over the area marked '*', wait for the ToolTip to display. Then move the mouse slowly down toward the bottom edge of the frame, again WITHOUT any mouse clicks. When the mouse cursor crosses the frame's bottom edge, the TipTest app/window is repainted and brought to the FRONT of the Calculator app, as though TipTest had been made active. However, it is not active, as the colors of the two applications title bars remain as they were. Also, any keystrokes are processed by the calculator program. ========== source ============== import com.sun.java.swing.*; import java.awt.event.*; import java.awt.*; import java.lang.*; public class TipTest extends JPanel { public TipTest() { setToolTipText(""); setBackground(Color.white); } public static void main(String argv[]) { JFrame f = new JFrame("Tooltip Bug Example"); TipTest p = new TipTest(); f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); f.getContentPane().add(p); f.setSize(new Dimension(350,250)); f.setVisible(true); } public String getToolTipText(MouseEvent e) { return "( x="+e.getX()+",y="+e.getY()+")"; } } (Review ID: 33521) ======================================================================
|