jinlin
2025-03-18 d30e385951ce03335a5023f0775fd144da3c0b88
src/main/java/com/example/client/Main.java
@@ -123,7 +123,6 @@
        hSplitPane.setDividerSize(10);
        hSplitPane.setOneTouchExpandable(true);
        hSplitPane.setContinuousLayout(true);
        frame.getContentPane().add(hSplitPane, BorderLayout.CENTER);
        JSplitPane vSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
@@ -172,6 +171,10 @@
        tabbedPane.addTab(title, panel);
        Component tabComponent = createTabComponent(title, tree);
        tabbedPane.setTabComponentAt(tabbedPane.getTabCount() - 1, tabComponent);// 设置自定义标签组件//切换到当前页面
        if (tabbedPane.getTabCount() > 5) {
            // 删除第一个标签
            tabbedPane.removeTabAt(0);
        }
        tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1);
    }