我有一个带有一些自定义对话框的全屏应用程序,我需要能够将它们添加到我当前层之上的一个层,我已经选择使用JLayeredPane,这样我就可以将tabbedPane添加到默认层上,并将内部帧添加到模式层,但我无法让JLayeredPane显示任何内容。它是纯灰色的。
JLayeredPane panel = new JLayeredPane();
//panel.add(workstationTabs);
panel.add(new JLabel("Something on it"));
JPanel topPanel = new JPanel();
topPanel.add(panel, JLayeredPane.DEFAULT_LAYER);
this.frame.setContentPane(topPanel);
this.frame.setResizable(false);发布于 2011-06-30 22:40:18
在全屏模式下,您几乎不能使用带有JTabbedPane的直接JLayeredPane作为直接子对象。至少从我之前的尝试来看不是这样的。
https://stackoverflow.com/questions/6116774
复制相似问题