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

ComponentListener method does not get called on an applet

    XMLWordPrintable

Details

    • sparc
    • solaris_2.5.1

    Description



      The program shows two problems:

      1. The componentHidden method does not get called if the applet window is
         covered by another window. It only gets called when the applet window
         gets iconified.

      2. The componentMoved method never gets called, no matter how often the
         applet window is moved around.

      ---------- test case -----


      import java.awt.*;
      import java.awt.event.*;
      import java.applet.*;

      public class BugInComponentEvent extends Applet implements ComponentListener {

          public void
          init() {
              addComponentListener(this); // ready to hear
          }
          
          public void componentHidden(ComponentEvent ce) { // maybe bug
              System.out.println("hidden");
          }
          public void componentMoved(ComponentEvent ce) { // bug
              System.out.println("moved");
          }
          public void
          componentResized(ComponentEvent ce) { // OK
              System.out.println("resized");
          }
          public void componentShown(ComponentEvent ce) { // maybe bug
              System.out.println("shown");
          }

      }

      Attachments

        Activity

          People

            msomlosunw Mike Somlo (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: