0

I'm working with a 3rd party plugin which includes a customized popup. This popup is added to a tab pane and when it appears, if to close to the JFrame border, only part of it will appear and the rest will draw off screen, as if it is behind the JFrame.

Is there anyway to check if a component bounds or its shape is completely visible to the user?

mKorbel
  • 109,525
  • 20
  • 134
  • 319
Frizinator
  • 1,351
  • 3
  • 12
  • 16

1 Answers1

3

Check out the javadocs for SwingUtilities.convertPointToScreen.

Will A
  • 24,780
  • 5
  • 50
  • 61
  • Thanks for the reply, but I don't quite understand how this works. Can you elaborate? – Frizinator Dec 09 '12 at 01:12
  • Hi Steven - what you'd want to do is get the lower-right point of the control you'd like to check and convert that point to a screen coordinate. Having done that, you can check whether that coordinate is within the screen bounds. – Will A Dec 09 '12 at 15:46