0

Hey everyone

I have created an application interface using Java swing on a mac, which looks exactly how I want it. However on windows and Linux the positioning of the components and what seems to be the dimensions look of place.

I have tried to make the sizes of everything relative to the screen resolution using Toolkit.getDefaultToolkit().getScreenSize(). I have also fiddled about with different look and feels but still cant get the app to look the same on different OS's.

Any advice would be much appreciated, Many thanks

3
Contributors
2
Replies
3
Views
4 Years
Discussion Span
Last Post by JamesCherrill
Featured Replies
  • 1

    you could start playing with the layouts. there is a null layout too, in which you specifiy every detail about your components, for instance, if you have a JTextField, you specifiy the location of the 4 points that decide the height and width. coding like that might solve your issue. Read More

  • Sounds like OP may be using null layout (?) - in which case the answer is to use a proper layout manager and a cross platform L&F like Nimbus or whatever you prefer. Read More

1

you could start playing with the layouts.
there is a null layout too, in which you specifiy every detail about your components, for instance, if you have a JTextField, you specifiy the location of the 4 points that decide the height and width.

coding like that might solve your issue.

1

Sounds like OP may be using null layout (?) - in which case the answer is to use a proper layout manager and a cross platform L&F like Nimbus or whatever you prefer.

This article has been dead for over six months. Start a new discussion instead.
Take the time to help us to help you. Please be thoughtful and detailed and be sure to adhere to our posting rules.