• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I make my swing GUI look the same on all screen resolutions?

 
Karri Tata Rao
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I had developed small GUI using swing group layout, which is nice to see on windows, but when I tried it on Linux the GUI look is varied. Then I set the GUI height and width by taking screen resolution, still it is varies the screen look. Please can you let me know how I can make the GUI such that it looks the same on all screen resolutions.



Thank you friends.
 
Flaz Four
Greenhorn
Posts: 7
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Karri!

Pay attention to SWING Look and Feel. There are several styles. Some of them are specific to target platform (line Windows or GTK+). But the "Metal" style should look equally on different platforms.

To be more specific:




 
Karri Tata Rao
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanking you friend for reply.

But my intention is not that. My GUI components varies in gaps between them for different platforms with different resolutions.

Please help me, here.

Thanking you.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karri Tata Rao wrote:
But my intention is not that. My GUI components varies in gaps between them for different platforms with different resolutions.

That could depend on the look and feel. What look and feel are you using?
 
Karri Tata Rao
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanking you to all my friends who gave their suggestions to help me in this regard.

I was resolved this problem finally. I fixed the problem by taking screen resolutions width and height, then I keeping all components of GUI according to screen resolutions(I kept the component size as some percentage of GUI size)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!