From 025d334b104b60fd41ff03933638d002a5a18234 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 15 Oct 2020 19:01:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-38688=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=9C=A8=E5=8F=8C=E5=B1=8F=E4=B8=8B=E6=8B=96=E5=8A=A8=E4=BC=9A?= =?UTF-8?q?=E6=9C=89=E5=8D=A1=E5=B1=8F=E7=9A=84=E7=8E=B0=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/DesignerFrame.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 2f65fca0a8..b734110612 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -548,9 +548,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta contentHeight = layeredPane.getHeight(); contentWidth = layeredPane.getWidth(); - layeredPane.remove(basePane); + // 这个地方remove和add都是一个对象 完全没有必要remove再add 改变了窗口大小重新设置下 然后有repaint即可 basePane.setBounds(0, 0, contentWidth, contentHeight); - layeredPane.add(basePane); layeredPane.repaint(); } From ec637d5ba2846e62d3cd59db5dd90b9ccf3e2206 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 20 Oct 2020 10:55:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-38688=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=9C=A8=E5=8F=8C=E5=B1=8F=E4=B8=8B=E6=8B=96=E5=8A=A8=E4=BC=9A?= =?UTF-8?q?=E6=9C=89=E5=8D=A1=E5=B1=8F=E7=9A=84=E7=8E=B0=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/DesignerFrame.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index b734110612..490b4e7e99 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -551,6 +551,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta // 这个地方remove和add都是一个对象 完全没有必要remove再add 改变了窗口大小重新设置下 然后有repaint即可 basePane.setBounds(0, 0, contentWidth, contentHeight); layeredPane.repaint(); + layeredPane.revalidate(); } /**