JDK-4679036 : REGRESSION: Tooltip causes window to be brought to front with Windows LnF
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-05-03
  • Updated: 2002-05-06
  • Resolved: 2002-05-06
Related Reports
Duplicate :  
Description

Name: jk109818			Date: 05/02/2002


FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

FULL OPERATING SYSTEM VERSION :Microsoft Windows 2000
[Version 5.00.2195] Service Pack 2


A DESCRIPTION OF THE PROBLEM :
With a Windows L&F....

Window 1 has focus, if i hover over a componet in window 2
such that the tooltip for that component appears, window 2
is brought to the front.

This behaviour doesn't happen with the Java L&F.

REGRESSION.  Last worked in version 1.3.1

EXPECTED VERSUS ACTUAL BEHAVIOR :
  Tooltip should appear but window should not gain focus.

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

/**
 *  This demonstrates a bug in Windows Look and Feel.
 *  When the dialog is opened and in front, point at
 *  the button in the main frame. The displayed
 *  tool tip will bring the frame to the front.
 *  This behavior is incorrect, and does not behave
 *  that way in other look and feels.
 */
public class Main
{
   JFrame f;
   public Main()
   {
      f = new JFrame("tool tip bug");
      JPanel p = new JPanel();
      JButton b = new JButton("pop dialog");
      b.setToolTipText("pop tip");
      b.addActionListener(new ActionListener()
      {
         public void actionPerformed(ActionEvent ev)
         {
            pop();
         }
      });

      p.add(b);
      f.setContentPane(p);
      f.setSize(200,200);
      f.setVisible(true);
   }
   public void pop()
   {
      JDialog d = new JDialog();
      d.setSize(50,100);
      d.setVisible(true);
      d.setLocationRelativeTo(f);
   }
   public static void main(String[] args)
   {
      if (args.length == 0)
      {
         try
         {
           UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
         }
         catch(Exception ex) {}
      }
      new Main();
   }
}
---------- END SOURCE ----------

Release Regression From : 1.3.1_03
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Review ID: 146125) 
======================================================================

Comments
EVALUATION Name: azR10139 Date: 05/06/2002 Case B of bug 4148057. Duplicate. ###@###.### 2002/05/06 ======================================================================
05-10-0172