diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java index b3d6e054d5..00c708baec 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java @@ -54,6 +54,7 @@ public class UIEastResizableContainer extends JPanel { private static final int DRAG_GAP_SIZE = 10; private Point dragPoint; + private boolean dragging; public UIEastResizableContainer() { this(new JPanel(), new JPanel()); @@ -71,12 +72,20 @@ public class UIEastResizableContainer extends JPanel { public void mousePressed(MouseEvent e) { if (isEnableDrag(e)) { dragPoint = e.getPoint(); + dragging = true; } } @Override public void mouseDragged(MouseEvent e) { - resizePanel(e); + if (dragging) { + resizePanel(e); + } + } + + @Override + public void mouseReleased(MouseEvent e) { + dragging = false; } };