Bring JPanel to front of other objects in java (SWING)

前端 未结 7 1894
轮回少年
轮回少年 2021-01-12 10:37

I want to make a loading message when an app processes, so I used a JPanel over a JTree. But when the user clicks on the JPanel, the <

相关标签:
7条回答
  • 2021-01-12 11:16

    For those who have no problem using a JDialog, this is a sure way to get it to show up if you're having issues. Just make sure to control it properly if the dialog is modal, when disposing, setting focus etc.

    JDialog dialog = new JDialog();
    dialog.setAlwaysOnTop(true);
    
    0 讨论(0)
提交回复
热议问题