File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Postioning JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Postioning JDialog" Watch "Postioning JDialog" New topic
Author

Postioning JDialog

will lopez
Greenhorn

Joined: Dec 03, 2003
Posts: 13
I'm trying to position a [child component] JDialog by using the setLocation(120,0), wDialog.setBounds(120 + lInsets.left,lInsets.top,wDialog.getWidth(),wDialog.getHeight()); but it keeps displaying partially off the screen, to the left.
TIA,
-Will
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

"will" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Where are the values in lInsets coming from? Could this possibly be returning negative values?

Thanks! and welcome to the JavaRanch!


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
will lopez
Greenhorn

Joined: Dec 03, 2003
Posts: 13
Nate:
The lInsets have the value 0, they're coming from the parent.
Thanks
will lopez
Greenhorn

Joined: Dec 03, 2003
Posts: 13
Nate:
Thanks for the help. I ended up "shrinking" the size of the JDialog and that did the trick...I still don't understand why the other methods didn't work but I guess this will do.
-Will
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Postioning JDialog