public boolean mouseMove(Component component, int x, int y) {
boolean consumed = super.mouseMove(component, x, y);
if (Mouse.getCapturer() == component) {
Window window = (Window)getComponent();
Display display = window.getDisplay();
Point location = window.mapPointToAncestor(display, x, y);
// Pretend that the mouse can't move off screen (off the display)
location.x = Math.min(Math.max(location.x, 0), display.getWidth() - 1);
location.y = Math.min(Math.max(location.y, 0), display.getHeight() - 1);
if (dragOffset != null) {
// Move the window
window.setLocation(location.x - dragOffset.x, location.y - dragOffset.y);
} else {