|
|
@ -548,9 +548,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta |
|
|
|
|
|
|
|
|
|
|
|
contentHeight = layeredPane.getHeight(); |
|
|
|
contentHeight = layeredPane.getHeight(); |
|
|
|
contentWidth = layeredPane.getWidth(); |
|
|
|
contentWidth = layeredPane.getWidth(); |
|
|
|
layeredPane.remove(basePane); |
|
|
|
// 这个地方remove和add都是一个对象 完全没有必要remove再add 改变了窗口大小重新设置下 然后有repaint即可
|
|
|
|
basePane.setBounds(0, 0, contentWidth, contentHeight); |
|
|
|
basePane.setBounds(0, 0, contentWidth, contentHeight); |
|
|
|
layeredPane.add(basePane); |
|
|
|
|
|
|
|
layeredPane.repaint(); |
|
|
|
layeredPane.repaint(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|