From c8c93c780db82c4a12d31d665d1992d7d6e27416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=E7=9A=AE?= <3293069420@qq.com> Date: Thu, 20 Nov 2025 15:55:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E4=BD=BF=E7=94=A8BoxLayout=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=8A=A8=E6=80=81=E7=A9=BA=E9=97=B4=E5=88=86=E9=85=8D?= =?UTF-8?q?=EF=BC=8C=E5=8D=95=E7=BA=AF=E4=BD=BF=E7=94=A8JSplitePane?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=E8=AF=B7=E6=B1=82=E8=B7=9F=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=8C=85=E5=B1=95=E7=A4=BA=E9=A1=B5=EF=BC=8C=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E2=80=9C=E5=93=8D=E5=BA=94=E5=8C=85=E5=92=8C=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=8C=85=E7=9A=84=E9=A1=B5=E9=9D=A2=E5=9E=82=E7=9B=B4=E5=88=86?= =?UTF-8?q?=E5=B8=83=E5=BC=82=E5=B8=B8=EF=BC=8C=E8=AF=B7=E6=B1=82=E5=8C=85?= =?UTF-8?q?=E7=9A=84ui=E7=95=8C=E9=9D=A2=E8=BF=87=E5=A4=A7=E2=80=9D?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/chave/ui/MainUI.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/chave/ui/MainUI.java b/src/main/java/com/chave/ui/MainUI.java index ce6c6e5..56fb944 100644 --- a/src/main/java/com/chave/ui/MainUI.java +++ b/src/main/java/com/chave/ui/MainUI.java @@ -37,7 +37,7 @@ public class MainUI { private JPanel leftPanel; private JPanel rightPanel; private JPanel rightTopPanel; - private JPanel rightBottomPanel; + private JSplitPane rightBottomPanel; private JPanel turnOnPanel; private JPanel domainOperatePanel; private JPanel domainMainPanel; @@ -152,7 +152,7 @@ private void init() { leftPanel = new JPanel(); rightPanel = new JPanel(); rightTopPanel = new JPanel(); - rightBottomPanel = new JPanel(); + rightBottomPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); turnOnPanel = new JPanel(); domainOperatePanel = new JPanel(); domainMainPanel = new JPanel(); @@ -540,10 +540,9 @@ public boolean isCellEditable(int row, int column) { rightTopPanel.add(Box.createVerticalStrut(2)); // 创建request/response展示面板 - BoxLayout rightBottomLayout = new BoxLayout(rightBottomPanel, BoxLayout.X_AXIS); - rightBottomPanel.setLayout(rightBottomLayout); - rightBottomPanel.add(requestEditor.uiComponent()); - rightBottomPanel.add(responseEditor.uiComponent()); + rightBottomPanel.setLeftComponent(requestEditor.uiComponent()); + rightBottomPanel.setRightComponent(responseEditor.uiComponent()); + // 创建右侧分隔面板 上下分隔 rightSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, rightTopPanel, rightBottomPanel);