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

Merlin(B26), Win2000 Hebrew,Solaris7IA, JToolTip throws exceptions

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      03
    • CPU:
      x86
    • OS:
      windows_2000

      Backports

        Description



        Name: jbT81659 Date: 08/08/2000

        JToolTip functionality is broken under Win2000 Hebrew and Solaris7IA

        To reproduce bug:
        1- Compile and run the following code (jToolTip.java):
        2- position the mouse on the buttons and move it over all buttons.
        3- Notice that exceptions are thrown at the command prompt.

        The following is a partial part of the error message I received:
        --------------------------
        Exception occurred during event dispatching:
        java.lang.NullPointerException
                at javax.swing.plaf.metal.MetalToolTipUI.getAcceleratorString(MetalToolTipUI.java:97)
                at javax.swing.plaf.metal.MetalToolTipUI.paint(MetalToolTipUI.java:71)
                at javax.swing.plaf.ComponentUI.update(ComponentUI.java:129)
                at javax.swing.JComponent.paintComponent(JComponent.java:412)
                at javax.swing.JComponent.paint(JComponent.java:713)
                at javax.swing.JComponent.paintChildren(JComponent.java:518)
                at javax.swing.JComponent.paint(JComponent.java:722)
                at javax.swing.JComponent.paintWithBuffer(JComponent.java:4221)
                at javax.swing.JComponent._paintImmediately(JComponent.java:4164)
                at javax.swing.JComponent.paintImmediately(JComponent.java:3995)
                at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:374)
                at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:119)
                at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
                at java.awt.EventQueue.dispatchEvent(EventQueue.java:368)
                at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:127)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:117)
                at java.awt.EventDispatchThread.run(EventDispatchThread.java:96)
        Exception occurred during event dispatching:
        java.lang.NullPointerException
                at javax.swing.plaf.metal.MetalToolTipUI.getAcceleratorString(MetalToolTipUI.java:97)
                at javax.swing.plaf.metal.MetalToolTipUI.getPreferredSize(MetalToolTipUI.java:88)
                at javax.swing.plaf.basic.BasicToolTipUI.getMinimumSize(BasicToolTipUI.java:155)
                at javax.swing.JComponent.getMinimumSize(JComponent.java:1130)
                at javax.swing.OverlayLayout.checkRequests(OverlayLayout.java:237)
                at javax.swing.OverlayLayout.layoutContainer(OverlayLayout.java:194)
                at java.awt.Container.layout(Container.java:702)
                at java.awt.Container.doLayout(Container.java:692)
        --------------------------

        --------------------------Code----------------------
        /* Copyright (c) Sun Microsystems 1998

        $Header: /home/sun/src/JDK1.2/jToolTip.java,v 1.14 2000/03/30 08:13:08 isam Exp $

        */

        import java.awt.*;
        import java.awt.event.*;
        import javax.swing.*;

        public class jToolTip extends JApplet
        {
                public void init()
                {
                        TooltipPanel1 tooltip = new TooltipPanel1();
                        getContentPane().add(tooltip);
                }

                public static void main(String[] argv)
                {
                        JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
                        frame.setContentPane(new TooltipPanel1());
                        frame.pack();
                        frame.setVisible(true);
                frame.addWindowListener( new WindowAdapter()
                {
                     public void windowClosing( WindowEvent e)
                     {
                         System.exit(0);
                     }
                });

                }
        }
        class TooltipPanel1 extends JPanel
        {
                public TooltipPanel1()
                {
        setLayout(new GridLayout(5,1));

        JButton Button1 = new JButton();
        JToolTip Button1TT = new JToolTip();

        Button1TT.setFont(new Font("Lucida Sans Regular",Font.PLAIN,12));
        Button1.setToolTipText ("\u0647\u0630\u0627\u0020\u064a\u0648\u0645\u0020\u0644\u0637\u064a\u0641\u0020\u05d6\u05d4\u0020\u05d9\u05d5\u05dd\u0020\u05e0\u05e2\u05d9\u05dd" );
        Button1.add(Button1TT);

        Button1.setFont(new Font("Lucida Sans Regular",Font.PLAIN,12));
        Button1.setText("\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631\u0020\u0042\u0049\u0047\u0020\u0052\u0045\u0044\u0020\u0041\u0050\u0050\u004c\u0045\u0053\u0665\u0667\u0669\u0661");

                        JButton Button2 = new JButton();
                        Button2.setFont(new Font("Lucida Sans Regular",Font.PLAIN,12));
        Button2.setText("\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020\u05d9\u05e4\u05d4\u0020\u0054\u0048\u0045\u0020\u0059\u0045\u0041\u0052\u0020\u0031\u0039\u0035\u0038");
                        Button2.setToolTipText ("\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020\u05d9\u05e4\u05d4\u0020\u0054\u0048\u0045\u0020\u0059\u0045\u0041\u0052\u0020\u0031\u0039\u0035\u0038");

                        JButton Button3 = new JButton();
                        Button3.setFont(new Font("Lucida Sans Regular",Font.PLAIN,12));
        Button3.setText("\u05ea\u05e4\u05d5\u05d6\u05d9\u05dd\u0020\u05d8\u05e2\u05de\u05d9\u05dd\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e");
                        Button3.setToolTipText ("\u05ea\u05e4\u05d5\u05d6\u05d9\u05dd\u0020\u05d8\u05e2\u05de\u05d9\u05dd\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e");

                        JButton Button4 = new JButton();
                        Button4.setFont(new Font("Lucida Sans Regular",Font.PLAIN,12));
        Button4.setText("\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u05d9\u05e7\u05e8");
                        Button4.setToolTipText ("\u006c\u0069\u006d\u0065\u0020\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u05d9\u05e7\u05e8\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e");

                        JButton Button5 = new JButton();
                        Button5.setFont(new Font("Lucida Sans Regular",Font.PLAIN,12));
        Button5.setText("\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u0020\u05d9\u05e7\u05e8");
                        Button5.setToolTipText ("\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631");
                        add(Button1);
                        add(Button2);
                        add(Button3);
                        add(Button4);
                        add(Button5);
                }
        }



        WorkAround:
        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                svioletsunw Scott Violet (Inactive)
                Reporter:
                jbenavrasunw Jonathan Benavraham (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: