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

JCK1.4a-runtime api/javax_swing/interactive/JToolTipTests.html#JToolTip fails

XMLWordPrintable

    • b12
    • x86
    • linux, windows_2000
    • Verified



      Name: iaR10016 Date: 11/19/2002


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.0, JDK1.4.1, JDK1.4.2-b07
      JCK : JCK1.4a-runtime
      Platform[s] : Turbo Linux 6.0 (GNOME), RedHat Linux 7.3, Windows 2000, Windows 98.
      switch/Mode : default
      JCK test owner : http://javaweb.eng/jck/usr/owners.jto
      Falling test : api/javax_swing/interactive/JToolTipTests.html#JToolTip [JToolTipTest0006]

      JCK1.4a-runtime api/javax_swing/interactive/JToolTipTests.html#JToolTip test fails on JDK1.4.2-b07.

      The following test example demonstrates the bug:

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

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

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

      Please, compile and run this test example and do the following steps to reproduce the bug:

      - Click on JWindowFrame. JWindowFrame gets the focus.
      - Wait until tooltip appears.

      It is expected that tooltip is "I am a JInternalFrame!". But actually it is "I am a JInternalFrame! Shift-Escape"

      If you click "ShiftEscape" now, unexpected java.lang.NullPointerException appears:
      ...
      java.lang.NullPointerException
       at javax.swing.plaf.basic.BasicInternalFrameUI$1.actionPerformed(BasicInternalFrameUI.java:153)
       at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1502)
       at javax.swing.JComponent.processKeyBinding(JComponent.java:2422)
       at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:253)
       at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:202)
       at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2499)
       at javax.swing.JComponent.processKeyBindings(JComponent.java:2491)
       at javax.swing.JComponent.processKeyEvent(JComponent.java:2385)
       at java.awt.Component.processEvent(Component.java:4830)
       at java.awt.Container.processEvent(Container.java:1380)
       at java.awt.Component.dispatchEventImpl(Component.java:3526)
       at java.awt.Container.dispatchEventImpl(Container.java:1437)
       at java.awt.Component.dispatchEvent(Component.java:3367)
       at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1700)
       at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:568)
       at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:739)
       at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:673)
       at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:534)
       at java.awt.Component.dispatchEventImpl(Component.java:3396)
       at java.awt.Container.dispatchEventImpl(Container.java:1437)
       at java.awt.Window.dispatchEventImpl(Window.java:1566)
       at java.awt.Component.dispatchEvent(Component.java:3367)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
       at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
      ...

      Test source location:
      =====================
      /java/re/jck/1.4a/promoted/fcs/binaries/JCK-runtime-14a/tests/api/javax_swing/interactive/JToolTipTests.java

      jtr file location:
      ==================
      /net/jtgb4u4c.eng/export/sail15/results/mantis/b07/jck14a/linux/turbo_gnome_client_incgc_linux-4/javax_swing/interactive/JToolTipTests_JToolTip.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change its variables)
      --- script start ---
      #!/bin/bash
      JCK="/net/linux-15/export/home/java/jck1.4a/JCK-runtime-14a"
      JDK="/net/linux-15/export/home/java/jdk1.4.2/linux"
      export CLASSPATH="$JCK/classes:$JCK/lib/javatest.jar"
      $JDK/bin/java javasoft.sqe.tests.api.javax.swing.interactive.JToolTip.JToolTipTests -TestCaseID JToolTipTest0006
      --- script end ---

      Click on the tested Internal Frame. Then wait untill the tooltip appears.
      Tooltip is "I'm a JInternalFrame Shift-Escape" instead of "I'm a JInternalFrame".

      Specific machine info:
      ======================
      Hostname: linux-4
      OS: Turbo Linux 6.0 (GNOME)

      Hostname: linux-19
      OS: RedHat Linux 7.3 (GNOME)

      Hostname: linux-22
      OS: RedHat Windows 2000

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

            leifs Leif Samuelsson (Inactive)
            irasunw Ira Ira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: