2

In Java, is there a way to determine if my frame is on the current virtual desktop or on one that is not currently visible?

The app has some popup frames (notifications), that display and I do not want them to display unless it is on the desktop where my main frame is located. I could ask the user via a JOptionPane, but it causes my desktop to switch over to the main frame.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
rcantrel
  • 177
  • 11
  • I updated the question. I have some popup frames, aka notifications, that display and I do not want them to display unless it is on the desktop where my main frame is located. Also if a JOptionPane displays it causes my desktop to switch over to the main frame. – rcantrel Aug 17 '20 at 05:19
  • Have you tried to check whether the frame reports to be visible if not on the current desktop? My hunch is it won’t. – weisj Aug 17 '20 at 11:35

0 Answers0