Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Postioning JDialog

 
will lopez
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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!
 
will lopez
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nate:
The lInsets have the value 0, they're coming from the parent.
Thanks
 
will lopez
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic