调整初始面板分布,图片区域占比更大

This commit is contained in:
2025-10-16 01:40:03 +08:00
parent 6aee53dda2
commit 8db61b11a0
@@ -122,8 +122,9 @@ public class ImageDotMarker extends JFrame {
private void createMainPanel() { private void createMainPanel() {
JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
splitPane.setDividerLocation(300); // 调整splitPane参数,让左侧图片面板占用更多空间
splitPane.setResizeWeight(0.7); splitPane.setDividerLocation(950);
splitPane.setResizeWeight(0.2);
// 左侧图片面板 // 左侧图片面板
JPanel imagePanel = new JPanel(new BorderLayout()); JPanel imagePanel = new JPanel(new BorderLayout());
@@ -195,7 +196,8 @@ public class ImageDotMarker extends JFrame {
}); });
JScrollPane listScrollPane = new JScrollPane(pointList); JScrollPane listScrollPane = new JScrollPane(pointList);
listScrollPane.setPreferredSize(new Dimension(280, 400)); // 减小列表滚动面板的首选高度
listScrollPane.setPreferredSize(new Dimension(250, 250));
// 点操作按钮 // 点操作按钮
JPanel buttonPanel = new JPanel(new GridLayout(1, 3, 5, 5)); JPanel buttonPanel = new JPanel(new GridLayout(1, 3, 5, 5));