This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Window Size

 
Anthony Watson
Ranch Hand
Posts: 327
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any advice on how big to make the main window? I have a big monitor and I'm not sure how my application will look on another monitor when I use the following code:

dbFrame.setSize(900, 650);

Thanks all.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Anthony:
It is better design to first retrieve the client resolution, then construct your frame according to this resolution. For example you might want to make your frame half of the size of the screen width and height.
 
Andy Zhu
Ranch Hand
Posts: 145
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, Hanna: how to retrieve client's screen info? Thanks.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use:

Dimension screenSize = getToolkit().getScreenSize();

then you can retrieve getWidth() and getHeight() of the Dimesion object.
 
Anthony Watson
Ranch Hand
Posts: 327
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Hannah. I'll follow your advice.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic