JDK-4940645 : setAlwaysOnTop(true) does not work in modal dialog in Windows
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: generic
  • Submitted: 2003-10-20
  • Updated: 2003-11-26
  • Resolved: 2003-11-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b30Fixed
Related Reports
Relates :  
Description
Here is the code that demonstrates the bug.

import java.awt.*;

public class AlwaysOnTop { 

    public static void main(String[] args) {
     
     Frame f = new Frame("Frame");
     f.setBounds(100,100,400,400);

     f.show();
   
     // Always on Top seems to not work on Windows if the Dialog 
     // is modal
     Dialog d = new Dialog(f,"Dialog",true);
     d.setAlwaysOnTop(true);
     d.setBounds(200,200,400,400);
     d.show();
      
     
    }


}

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b30 tiger-beta
24-08-2004

SUGGESTED FIX Name: osR10079 Date: 11/04/2003 ------- WDialogPeer.java ------- *** /tmp/sccs.ZZayMr Mon Oct 27 06:41:26 2003 --- WDialogPeer.java Tue Oct 21 12:51:24 2003 *************** *** 59,64 **** --- 59,67 ---- if (dlg.isModal()) { showModal(); WToolkit.getWToolkit().notifyModalityChange(ModalityEvent.MODALITY_PUSHED); + if (((Window)target).isAlwaysOnTop()) { + setAlwaysOnTop(true); + } } else { super.show(); } ###@###.### 04 Nov 2003 ======================================================================
24-08-2004

EVALUATION Name: osR10079 Date: 10/24/2003 Showing of modal dialogs is a little bit different then showing of other windows. And we forgot to set always-on-top property of native window on this way. To fix this we should update always-on-top property in WWindowPeer.show(). ###@###.### 2003-10-24 ======================================================================
24-10-2003