Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HELP : Difference GUI appearance on WIN2000 server and WIN98

 
kwwong wong
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using WIN2000 server platform to develope the program. When I deploy my applicaton to WIN98, the appearance of GUI is different from the WIN2000. The JTextField is very narrow on the screen when running on WIN98. It is normal on WIN2000 server. What wrong ?
My J2SDK version is 1.4.1_01. Layout Manager is GridBagLayout.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi kwwong
This is a side effect of the fact that different platforms have different default fonts, and different standard sizes for components. For example, a button that is 75 pixels wide under Windows will be 80 pixels wide under Motif.
In this case, it sounds like the combined sizes of the fields exceed the width of the panel on the given platform. So in one of the fields, Java has decided that it cannot honour your requested size, and given it a minimum size.
Not being a GUI person, I dont remember the proper way to fix this. From memory it is something to do with setting minimum as well as requested sizes on components. SpringLayout also rings a bell.
The way I worked around it whenever I came across it was to change the sizes of the fields or the minimum size of the panel.
Hopefully someone will be able to post a better answer.
Good luck.
Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic