Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4871085

Tooltip for JInternalFrame behaves incorrectly

    Details

    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: iaR10016 Date: 05/29/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.2-b24, JDK1.5.0-b06, JDK1.4.1, JDK1.4.0
      Platforms : all

      JavaTM 2 Platform Std. Ed. v1.4.2 Specification reads about JComponent.setToolTipText(String) method:
      ...
      public void setToolTipText(String text)
      Registers the text to display in a tool tip. The text displays when the cursor lingers over the component.
      ...

      The following test example demonstrates the bug.

      --------- test.java ---------
      jmport javax.swing.*;
      import java.awt.*;

      public class test extends JFrame {
           public test() {
               super("JInternalFrame test");
               JDesktopPane dpane = new JDesktopPane();
               JInternalFrame internalFrame = new JInternalFrame("JInternalFrame");
               internalFrame.setBounds(20,20,100,150);
               internalFrame.setToolTipText("I am a JInternalFrame!");
               internalFrame.setVisible(true);
               dpane.add(internalFrame);
               getContentPane().add( dpane, BorderLayout.CENTER );
           }

           public static void main(String[] args) {
               JFrame frame = new test();
               frame.setSize(new Dimension(400,300));
               frame.setVisible(true);
           }
      }
      -----------------------------

      This example creates and shows JInternalFrame component with "I am a JInternalFrame!" tooltip.
      Please, do the following steps to reproduce the failure:

      1. Compile and run the test
      2. Park mouse over the JInternalFrame component. It is expected that tooltip will appear, but it does not happen.
      3. Select JInternalFrame (just click it). Now tooltip appears if you park mouse over the JInternalFrame content pane (this
          is OK), but id does not appear if you park mouse over the JInternalFrame's header area.

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                irasunw Ira Ira (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: