title: TOPMOST window in full-screen
body: <p>I'm playing with a JFrame in Java. I want it to be the topmost window i.e. always on top. The setAlwaysOnTop() works fine, but as soon as I start a movie or a game-window in a full-screen mode then it fails to stay on top. </p>
  
  <p>I played around with JNI and handles. My C code for JNI is using SetWindowPos() and this seems to be working OK until I start a full-screen app. Here's a sample:</p>
  
  <pre><code>JNIEXPORT void JNICALL Java_Frame1_setWindowAlwaysOnTop
  (JNIEnv *env, jclass obj, jint hwnd, jboolean flag)
  {
    if (flag)
      SetWindowPos((HWND) hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    else
      SetWindowPos((HWND) hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
    return;
  }
  </code></pre>
  
  <p>I've been googling for some time now and all I established is that the full-screen runs in an exclusive mode and "<em>suspend the windowing system so that drawing can be done directly to the screen</em>".</p>
  
  <p>Can anyone suggest a workaround? BTW. my C is not that brilliant, so go easy..<br></p>
  
  <p>Thanks!
  Damo</p>