• Post Reply Bookmark Topic Watch Topic
  • New Topic

ScreenSize for the umpteenth-time  RSS feed

 
martin chile
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With Toolkit.getDefaultToolkit().getScreenSize() I get the actual ScreenSize.
But I want the ScreenSize WITHOUT the standard MS-TASKBAR (in consideration of taskbar heigth and position on the screen[can be at N/S/W/E of screen]).
Has someone a solution for this without using JNI or has someone a c++ class for that and an instruction how to use it because I havent worked with JNI yet. Any hint would be useful too. Thanks a lot!
 
Sascha Herrmann
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're on JDK 1.4.x you could give GraphicsEnvironment and its getMaximumWindowBounds() method a try.
Sascha
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're working with a frame/JFrame, this should work too"
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
If you actually needed the size, you could get the size after maximizing.
Brian
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!