I have a fullscreen app with some custom dialogs and I need to be able to add them a layer above my current layer, I have chosen to use a JLayeredPane so that I can add the tabbedPane to it on the default layer and the internalframes to the modal layer but I cannot get t开发者_C百科he JLayeredPane to display anything. It's just solid grey.
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);
You pretty much cannot use a straight up JLayeredPane with a JTabbedPane as a direct child in fullscreen mode. At least not from what I'd been trying.
精彩评论