Omnomnomnom
Omnomnomnom

Reputation: 153

Fixed size swing GUI changes when using different resolution

I have a small java application with a swing gui. I have set a fixed size for the window and everything works really well. But when using the GUI on different screens, the objects seem to have moved slightly. (Labels not showing their entire text etc,...) I think the difference lies in the aspect ratio of the screen but is there any way to counter this?

Upvotes: 0

Views: 2261

Answers (2)

khachik
khachik

Reputation: 28703

I agree with Bryan. There are many reasons - the screen resolution, localization (if you do so), different look-and-feels and rendering depending on the platform and/or JVM version. Swing's layouts are flexible enough to do everything you want without fixing the frame size. Otherwise you are going to implement your rendering engine to calculate everything which is rendered.

Upvotes: 2

Bryan Oakley
Bryan Oakley

Reputation: 385830

The way to counter it is to not used fixed size windows.

Upvotes: 5

Related Questions