• Post Reply Bookmark Topic Watch Topic
  • New Topic

how can I set coordinates of JFrame on JPanel

 
Anissa Pary
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have a JPanel and I want JFrame to be exactly at coordinate(10,10.5) on a JPanel how can I do that? I need a double in there if setLocation makes 2 ints...
 
Darryl Burke
Bartender
Posts: 5153
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want JFrame to be exactly at coordinate(10,10.5) on a JPanel

Since you can't add a Window to a Container, the question is moot.
 
Scott Kimberly
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:
I want JFrame to be exactly at coordinate(10,10.5) on a JPanel

Since you can't add a Window to a Container, the question is moot.


Itd be the other way around and the best way to have total control of your GUI is to use something like the Window Builder plugin (if you use eclipse) which lets you control GUI creation with perfect precision. If you can figure out how to use it properly.
 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use a GUI builder you absolutely do not have total control over your GUI. Having a proper understanding of containers, layout managers etc will get you much further.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!