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

Tooltip window flickers on applet

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      other, x86
    • OS:
      windows_xp

      Description

      Removing incorrect entry
      Removing incorrect entry
      Removing incorrect entry
      Removing incorrect entry
      Removing incorrect entry
      OPERATING SYSTEM(S)
      Windows XP SP1 and 2000 SP4 for IA32
      FULL JDK VERSION(S):
      java version "1.5.0_04"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
      DESCRIPTION:
      Steps to Recreate:
      1. Compile the following sample applet.
      > javac ToolTipTest.java
      ============================ ToolTipTest.java =================================
      import javax.swing.JApplet;
      import javax.swing.JFrame;
      import javax.swing.JLabel;
      public class ToolTipTest extends JApplet{
      public void init() {
      getContentPane().add(createLabel());
      }

      public JLabel createLabel(){
      JLabel l = new JLabel("test");
      StringBuffer buff = new StringBuffer();
      buff.append("<html>");
      for (int i=0; i<200; i++){
      buff.append("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br>");
      }
      buff.append("</html>");
      l.setToolTipText(buff.toString());
      return l;
      }

      public static void main(String [] args){
      JFrame f = new JFrame();
      ToolTipTest applet = new ToolTipTest();
      f.getContentPane().add(applet.createLabel());
      f.setSize(300,300);
      f.setVisible(true);
      }
      }
      ===================================================================================
      2. Create tooltip.html
      ================ tooltip.html ========================
      <html>
        <head>
          <title>tooltip</title>
        </head>
        <body>
            <applet code=ToolTipTest
             width=695 height=525>
            </applet>
        </body>
      </html>
      ======================================================
      3. Run the sample applet.
       > appletviewer tooltip.html
        Then an applet window comes up.
      4. Move the window to the right side of the screen.
      5. Move cursor to the right side of the window, and wait for a while.
         Then a tooltip window shows up. However the tooltip flickers. <--- PROBLEM!!
         This problem seems to occur when java tries to show a big size of tooltip.
      Result
      Tooltip window flickers.
      Expected Result
      Tooltip window should not flicker.
      Additional Information:
      This problem does not occur on java application.

        Attachments

          Activity

            People

            Assignee:
            serb Sergey Bylokhov
            Reporter:
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: