As suggested in this similar thread , try:
getRootPane().putClientProperty("apple.awt.draggableWindowBackground", Boolean.FALSE);
If you decide to use this, the scroll bar will be used and the window will not be dragged. However, you can get stuck in a fixed window if you do not add MouseMotionListener
and move the window around the mouseDragged()
method using a call like frame.setLocation()
.
Instead, you can force the user to click the arrow buttons on the scroll bar, rather than dragging the scroll bar ... But this is not the most user-friendly idea I have ever seen.
source share