我想通过JDialog
看到GlassPane
,但我没有看到它。为什么会发生?如何通过JDialog
看到GlassPane
?GlassPane在JDialog上不可见
下面是我在做什么:
public class New_Window extends JDialog {
public New_Window(int Screen_Index, int Start_Panel, int Length) {
super(new Frame(Monitors.getInstance().getNextDevice()
.getDefaultConfiguration()), Title, false);
setLayout(new BorderLayout());
setGlassPane(glassPane);
getGlassPane().setVisible(true);
getContentPane().setBackground(Color.black);
JPanel Container = new JPanel(new FlowLayout(FlowLayout.CENTER, 2, 2));
Container.setOpaque(false);
getContentPane().add(Container, BorderLayout.CENTER);
[...]
}
}
注:我使用的Java版本6更新24.我使用一个自定义GlassPane
其设置为false
opaque
值。
java哪个版本? – mdma 2011-04-17 09:45:29
请给我们更完整的代码。玻璃窗格将其不透明值设置为false。如果您使用的是默认的问题。但我很明显地猜测。 – Boro 2011-04-17 09:49:06
即时通讯使用版本6更新24和Im使用自定义glassPane并将其不透明值设置为false – ama 2011-04-17 09:52:38