jinlin
2025-03-18 d30e385951ce03335a5023f0775fd144da3c0b88
src/main/java/com/example/client/service/SubunitService.java
@@ -3,6 +3,7 @@
import com.example.client.dto.ColumnDto;
import com.example.client.dto.JComboBoxItem;
import com.example.client.utils.CommonTable;
import com.example.client.utils.Compute;
import com.example.client.utils.GBC;
import com.example.server.cabin.service.CabinService;
import com.example.server.progressTrack.model.DjJdgzNetworkLevel3;
@@ -47,11 +48,16 @@
        JPanel jLeft = new JPanel(new BorderLayout());
        JPanel top = new JPanel();
        JPanel center = new JPanel();
        GridBagLayout layout = new GridBagLayout();
        top.setLayout(layout);
        jLeft.setPreferredSize(new Dimension(width / 2 - 20, height));
        top.setPreferredSize(new Dimension(width / 2 - 20, 100));
        jLeft.setPreferredSize(new Dimension(width / 2 - 20, Compute.ComputeHeight(0,frame)));
        center.setPreferredSize(new Dimension(width / 2 - 20, Compute.ComputeHeight(100,frame)));
        jLeft.add(center,BorderLayout.CENTER);
        // 创建左侧表格
@@ -125,7 +131,7 @@
        JTable subTable = CommonTable.createCommonTable(list, columnDto);
        subTable.setRowHeight(25);
        subTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
        subTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        comboBox.addItemListener(new ItemListener() {
            public void itemStateChanged(final ItemEvent event) {
@@ -305,7 +311,22 @@
        JScrollPane scrollTable = new JScrollPane(subTable);
        jLeft.add(scrollTable, BorderLayout.CENTER);
        scrollTable.setPreferredSize(new Dimension(width / 2 - 20, Compute.ComputeHeightWithScroll(100,frame)));
        center.add(scrollTable);
        frame.addComponentListener(new ComponentAdapter() {
            @Override
            public void componentResized(ComponentEvent e) {
                jLeft.setPreferredSize(new Dimension(width / 2 - 20, Compute.ComputeHeight(0,frame)));
                center.setPreferredSize(new Dimension(width / 2 - 20, Compute.ComputeHeight(100,frame)));
                scrollTable.setPreferredSize(new Dimension(width / 2 - 20,Compute.ComputeHeightWithScroll(100,frame)));
                jLeft.revalidate();
                jLeft.repaint();
                center.revalidate();
                center.repaint();
                scrollTable.revalidate();
                scrollTable.repaint();
            }
        });
        JPanel track = addOrUpdate.createTrack(width / 2, height, list.get(0),  frame);