[LibGDX] Is there a way to set the position of the application window?

So, if I understand correctly, since LibGDX uses LWJGL as a backend, LwjglApplicationConfiguration is used to set the properties of the application (such as if it’s resizable, width, height, etc) — but there doesn’t seem to be any setting to be able to set the window’s position on the monitor.

My game runs on a 1280x720 resolution and my laptop’s resolution is 1366x768. When I run the game, the way it launches by default is such that a small portion of the game window is hidden at the bottom of the screen out of view. Sure, this is easily fixed by dragging the window up, but it would be better if dragging the window weren’t necessary.

So if there is any way to set the window’s position so that it launches exactly where I want it to be, that would be great. Thanks!

Hi, I use Display.setLocation() like this to make the application open on my right monitor.



public static void main(String[] args) {
		
		LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
		cfg.title = "test";
		cfg.useGL20 = false;
		cfg.width = 800;
		cfg.height = 600;
		cfg.resizable = true;

		new LwjglApplication(new Start(), cfg);
		
		Display.setLocation(2000, 0);
		
		
	}


LwjglApplicationConfiguration has x and y fields to position the window.

There we go.

I was afraid it would be terribly simple -_-

Thanks.