Tag: 模态

Java(仅限Windows的问题):当弹出modal dialog并单击阻止的JFrame时,alwaysOnTop JFrame会落到z-order的底部

我有一个Java应用程序,其基本UI由两个JFrame组成:客户区和工具调色板,它应始终显示在客户区上方。 为了实现这一点,工具调色板设置为alwaysOnTop(true),在所有情况下都可以很好地保存一个独有的Windows:当弹出模态JDialog时,单击客户区和/或调色板(两者都是阻止)导致调色板落在客户区后面。 关闭modal dialog后,调色板会重新出现,但其“始终在顶部”已丢失:单击客户区会遮挡调色板。 这是一个最小的单源文件演示: // FloatingPaletteExample.java // 4/11/2012 sorghumking // // Demo of a Windows-only issue that has me puzzled: When a modal dialog is // opened, and user clicks in blocked JFrames (sequence depends on ownership of // modal dialog: follow the instructions in modal dialog to see the problem // behavior), the […]