• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

SWT Shell location on maximize

 
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recently discovered while testing that, when an SWT Shell is maximized, e.g. via setMaximize, the new location reported always appears to be off the display, e.g. the Point object returned will be something like Point {-5,-5}. This is true regardless of whether the location is retrieved via getLocation or getBounds. How far off the screen the location is seems to be dependent upon the screen resolution. I have seen values from Point {-4,-4} to Point {-13,-13}.

I would have expected the location (after maximize) to always be Point {0,0}. Why is it not?

I have tested this with different machines, different versions of Windows (7 & 8), and different versions of SWT. All seem to behave this way.

Can anyone offer an explanation?

Thanks!
 
Hey cool! They got a blimp! But I have a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic