- 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();
}
}
======================================================================
> 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();
}
}
======================================================================
- relates to
-
JDK-5020154 TEST_BUG: java/awt/Dialog/FileDialogSetLocationTest/FileDialogsetLocationTest.ht
- Resolved