0

I am developing a Swing application with custom CSS rendering. As part of the system I use JDialogs as well, but I need to access certain components outside of the dialog (emergency buttons).

For this I chose following method:

  • all dialogs are non-modal. Those I want to make quasi-modal, will be setAlwaysOnTop.
  • There is always one quasi modal dialog up. In this case I put another dialog up, below this one, full-screen, semi-permanent.
  • This "blur" dialog shall cover the whole screen, catch mouse events and forward them to the emergency buttons only. In parallel I opened gaps on it so that the emergency buttons can be seen through the semipermanent surface without any effect.
  • The blur dialog can never be focused or activated (I have a vetoable listener for this)

Everything works fine, until someting happens and the blur dialog seems to cover my quasi-modal dialog. However, if I move any external application window over it, the quasi-modal dialog remains on the top. Instead of a complicated explanation, see picture un following link: http://lost.lost.hu/javascreen.png

So far I tried to debug repaints, events, everything, and could not find anything that would cause this. Especially the case depicted above challenges me to understand what is going on here.

I have recently updated to Java 1.7, in hope to get rid of this phenomenon, but today it came back.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
  • 1
    well could be good question, based on [SSCCE](http://sscce.org/), JDK, NativeOS, with removed setAlwaysOnTop and replaced with logics to change ModalityType on fly – mKorbel Apr 30 '13 at 09:53
  • Unfortunately the whole system is quite complex so I cannot simply include a code snippet. I first thought that it is the focusing subsystem, but after solving those issues 2 weeks was OK then it came back. Today I have seen it again. If it helps: the main dialog has widgets. When I click any of them, and I stop at a breakpoint in the mouse event handler, the background dialog is already in front. Before the focusing subsystem could have done anything. The repaint of the background dialog is not invoked, so what I think is that java or the OS's windowing system repaints some cached layers. – user2335296 Apr 30 '13 at 10:10
  • maybe someone faced with the same issue – mKorbel Apr 30 '13 at 10:11
  • Windows XP Professional version 2002 SP3, jdk is 1.7.0_17 – user2335296 Apr 30 '13 at 10:13
  • *"I cannot simply include a code snippet"* Nobody suggested you post a code snippet, but an SSCCE. Quite different, please read the link. – Andrew Thompson Apr 30 '13 at 10:23
  • Thank you, I did. I still maintain my point. – user2335296 Apr 30 '13 at 11:04
  • Probably a timing issue. Normally, during development, I start my app from within Eclipse. Now I run a full build to see if it comes if started normally. It did not. Still, I would be keen to hear opinions about what is on the linked picture. How do you explain it? – user2335296 Apr 30 '13 at 11:08

0 Answers0