jinlin
2025-03-18 d30e385951ce03335a5023f0775fd144da3c0b88
src/main/java/com/example/client/Main.java
@@ -64,14 +64,8 @@
        Font font = new Font("宋体", Font.BOLD, 23);
        setUIFontService.setFont(font);
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
        } catch (Exception e) {
            e.printStackTrace();
        }
        JPopupMenu.setDefaultLightWeightPopupEnabled(false);
        JFrame frame = new JFrame("进度跟踪");
        frame.setSize(width, height);
        frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
@@ -129,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);
@@ -178,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);
    }