Used
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
int w = gd.getDisplayMode().getWidth();
int h = gd.getDisplayMode().getHeight();
@mitm’s solution would probably also have worked.
Thanks for the input!