• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Position of new frame

 
Alfred Harre
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can I position new frame in the center of screen?
Regards
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the JFrame api scroll down to the Methods inherited from class java.awt.Window section to find setLocationRelativeTo(null).
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually do something like this:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic