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

file dialog width or height larger than parent frame won't move

    XMLWordPrintable

Details

    • sparc
    • solaris_2.5

    Description

        - if FileDialog is larger in either extent than the parent
      > application frame, the application cannot make it
      > move to a given location using move().



      Name: rrT76497 Date: 05/06/98

      NSRammohan/Siptech April 24,98.

      /**
      * @test
      * @bug 1242999
      * @summary FileDialog not Moving
      * @run manual= yesno
      */
      import java.awt.*;
      import java.awt.event.*;

      public class FileDialogTest extends Frame
      {
          FileDialog filedialog=new FileDialog(this,"Testing");
          public FileDialogTest()
          {
              add(new Button("Show FileDialog"){
                  {enableEvents(AWTEvent.MOUSE_EVENT_MASK);}
                  public void processMouseEvent(MouseEvent e)
                      {
                          if(e.getID() == MouseEvent.MOUSE_CLICKED)
                              {
                                  //Setting the FileDialog default Location

                                  filedialog.setLocation(this.getLocation().x,this
      .getLocation().y);
                                  //System.out.println("FileDialog's Location
      Before move :"+filedialog.getLocation());
                                  //Moving the FileDialog 100,100 Locations
                                  filedialog.setLocation(getLocation().x+100,getLo
      cation().y+100);
                                  //System.out.println("FileDialog's Location
      After move :"+filedialog.getLocation());
                                  filedialog.show();
                              }
                      }},"North");
              add(new Label("When you click the Show FileDialog Button the
      FileDialog has"+
                              "to be Located at 100,100 coordinate "));
              setSize(800,600);
              setVisible(true);
              addWindowListener(new WindowAdapter(){
                   public void windowClosing(WindowEvent e) {dispose();}});
          }
          public static void main(String[] as)
          {
              new FileDialogTest();
          }
      }



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

      Attachments

        Issue Links

          Activity

            People

              rramsunw Ranganathan Ram (Inactive)
              bhagen Benjamin Hagen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: