开发者

JTabbedPane inside a JLayeredPane

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜