-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.1, 1.1.6
-
generic, x86
-
generic, windows_nt
When a component is placed at the bottom of a JInternalFrame, its lightweight
tooltip is not visible because it is positioned below the JInternalFrame. The
ToolTipManager should position the tooltip immediately above the component instead.
To see this run the example below with Swing 1.0.3 or 1.1. When the mouse is
placed over the upper button, its tooltip appears underneath, but when the mouse
is moved over the lower button, its tooltip does not appear.
Now uncomment the ToolTipManager call to set tooltips to mediumweight. The lower button's tooltip now appears beneath the JInternalFrame.
---------------------------- MissingToolTip.java ------------------------------
import java.awt.*;
import java.awt.event.*;
import com.sun.java.swing.*;
import com.sun.java.swing.event.*;
import com.sun.java.swing.border.*;
public class MissingToolTip extends JFrame {
JDesktopPane desktop;
JInternalFrame jif;
JButton jb1, jb2;
public MissingToolTip() {
super("MissingToolTip");
setSize(800, 800);
desktop = new JDesktopPane();
setContentPane(desktop);
jif = new JInternalFrame("Internal Frame", true, true, true, true);
jif.setSize(600, 600);
jb1 = new JButton("Upper Button");
jb2 = new JButton("Lower Button");
jb1.setToolTipText("Upper Button Tooltip Text");
jb2.setToolTipText("Lower Button Tooltip Text");
// ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
jif.getContentPane().setLayout(new BorderLayout());
jif.getContentPane().add("North", jb1);
jif.getContentPane().add("South", jb2);
desktop.add(jif);
setVisible(true);
}
public static void main(String args[]) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {}
MissingToolTip mtt = new MissingToolTip();
}
}
-------------------------------------------------------------------------------
I retested this problem today, and was unable to duplicate. The tool tips appear unclipped to the right or below the frame where necessary, whether or
not medium-weight tool tips are enabled. The JDK is 1.1.6N, Swing version 1.0.3.
nick.rodin@eng 1998-04-07
tooltip is not visible because it is positioned below the JInternalFrame. The
ToolTipManager should position the tooltip immediately above the component instead.
To see this run the example below with Swing 1.0.3 or 1.1. When the mouse is
placed over the upper button, its tooltip appears underneath, but when the mouse
is moved over the lower button, its tooltip does not appear.
Now uncomment the ToolTipManager call to set tooltips to mediumweight. The lower button's tooltip now appears beneath the JInternalFrame.
---------------------------- MissingToolTip.java ------------------------------
import java.awt.*;
import java.awt.event.*;
import com.sun.java.swing.*;
import com.sun.java.swing.event.*;
import com.sun.java.swing.border.*;
public class MissingToolTip extends JFrame {
JDesktopPane desktop;
JInternalFrame jif;
JButton jb1, jb2;
public MissingToolTip() {
super("MissingToolTip");
setSize(800, 800);
desktop = new JDesktopPane();
setContentPane(desktop);
jif = new JInternalFrame("Internal Frame", true, true, true, true);
jif.setSize(600, 600);
jb1 = new JButton("Upper Button");
jb2 = new JButton("Lower Button");
jb1.setToolTipText("Upper Button Tooltip Text");
jb2.setToolTipText("Lower Button Tooltip Text");
// ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
jif.getContentPane().setLayout(new BorderLayout());
jif.getContentPane().add("North", jb1);
jif.getContentPane().add("South", jb2);
desktop.add(jif);
setVisible(true);
}
public static void main(String args[]) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {}
MissingToolTip mtt = new MissingToolTip();
}
}
-------------------------------------------------------------------------------
I retested this problem today, and was unable to duplicate. The tool tips appear unclipped to the right or below the frame where necessary, whether or
not medium-weight tool tips are enabled. The JDK is 1.1.6N, Swing version 1.0.3.
nick.rodin@eng 1998-04-07
- relates to
-
JDK-4139087 Bad display of Lightweight Tooltips in JInternalFrame
- Resolved