setLocation inproperly places the component after setSize on Win32

XMLWordPrintable

    • generic
    • generic

      setLocation incorrectly locate the component after setSize has been invoked on Win32.

      import java.awt.*;

      public class fjtest extends java.applet.Applet{

              Choice ch;
              Button bt;

              public void init(){
                      ch = new Choice();
                      bt = new Button("button");
                      ch.add("item1");
                      ch.add("item2");
                      ch.add("item3");
                      ch.add("item4");
                      ch.add("item5");
                      ch.add("item6");
                      ch.add("item7");
                      ch.add("item8");
                      ch.add("item9");
                      ch.add("item10");
                      add(ch);
                      add(bt);
              }

              public boolean action(Event ev, Object arg) {
                      if (ev.target instanceof Button) {
                              ch.setSize(200,200);
                              ch.setLocation(0,0);
                      }
                      return true;
              }
      }

            Assignee:
            Brent Christian
            Reporter:
            Shoji Ishida (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: