From fd630a18010a8001dda1c63e074a8b76c90672e3 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 15 Oct 2020 19:01:56 +0800 Subject: [PATCH] =?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 2f65fca0a..b73411061 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(); }