File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JFileChooser dialog - How to setLocation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFileChooser dialog - How to setLocation?" Watch "JFileChooser dialog - How to setLocation?" New topic

JFileChooser dialog - How to setLocation?

Amit Rosner

Joined: Dec 03, 2001
Posts: 22
I want to use JFileChoose dialog, but I can't find
out how to set its location. In it only says in the description of showDialog(Component parent, String approveButtonText) :
If the parent is a component, then the dialog depends on the frame containing the component, and is positioned relative to the component (for example, centered over the component)

Yet - I want to set the location specifically with a Point, just like setLocation(Point p) in java.awt.Component
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
Have you tried setLocation.
I agree. Here's the link:
subject: JFileChooser dialog - How to setLocation?
It's not a secret anymore!