• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ScreenSize for the umpteenth-time

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're on JDK 1.4.x you could give GraphicsEnvironment and its getMaximumWindowBounds() method a try.
Sascha
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic