This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how can I set coordinates of JFrame on JPanel  RSS feed

 
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: 5167
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: 21087
85
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!