We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Java lookandfeel

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
39 Minutes
Discussion Span
1 Year Ago
Last Updated
3
Views
devin2203
Newbie Poster
10 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

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.

stultuske
Industrious Poster
4,382 posts since Jan 2007
Reputation Points: 1,318
Solved Threads: 610
Skill Endorsements: 24

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.

JamesCherrill
... trying to help
Moderator
8,527 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,456
Skill Endorsements: 30

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0601 seconds using 2.75MB