This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: JFileChooser dialog - How to setLocation?
It's not a secret anymore!