我JxBrowser 6.2
在 Windows 上使用。我尝试在浏览器视图上方添加一个摆动组件(下拉菜单)。
即使在 modal_layer 中添加这个组件,该组件也会出现在浏览器下。
我使用这段代码:
JButton btn = new JButton("Hello");
btn.setBackground(Color.RED);
btn.setBounds(0, 0, 500, 300);
frame.getLayeredPane().add(btn, JLayeredPane.MODAL_LAYER, 0);