• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

ScreenSize for the umpteenth-time

 
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!
 
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
 
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
 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic