开发者

JTabbedPane inside a JLayeredPane

开发者 https://www.devze.com 2023-03-08 15:10 出处:网络
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 def

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

精彩评论

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

关注公众号