So I get the mouse position relative to the screen, not the window:
static int mousex; static int mousey; public void mouse(){ this.mousex=(int)MouseInfo.getPointerInfo().getLocation().getX(); this.mousey=(int)MouseInfo.getPointerInfo().getLocation().getY(); } How to get the coordinates specifically for the window?
SwingUtilities.convertPointFromScreen(MouseInfo.getPointerInfo().getLocation(), component)- Senior Pomidor