Java Swing Problem in XP

J

Jerry

I have developed a Java Swing GUI application. Under Windows 2000,
everything including button, text box etc is fine. But under windows XP
default evironment, some text box will dissappear and some button will
be lowered to the side of the application. These scenario happened to
some text box or some buttons, not to all of them. Some text box are
still shown.

When I change the XP performatnce setting under "control panel ->
System -> Advanced -> Performance" to "Adjust to best performance" and
this environment is similar to Win 2000. Then, those disappeared text
boxes appear and those buttons return above the side.

Anyone knows how to fix such problem? Or should I just update the user
guide to ask user adjust performance settings?

Thanks for your help!
 
A

Andrew Thompson

Jerry said:
I have developed a Java Swing GUI application.

Did you use layouts?

Was there a lot of use of 'setSize' in the code?
...Under Windows 2000,
everything including button, text box etc is fine. But under windows XP
default evironment, some text box will dissappear and some button will
be lowered to the side of the application. These scenario happened to
some text box or some buttons, not to all of them. Some text box are
still shown. ...

Anyone knows how to fix such problem?

<tongue in cheek>
Change line, 234. That '-' should be a '+'
</tongue in cheek>

Can you provide an SSCCE that demonstrates the problem?
<http://www.physci.org/codes/sscce.jsp>
 
J

James Cunningham

When I change the XP performatnce setting under "control panel ->
System -> Advanced -> Performance" to "Adjust to best performance" and
this environment is similar to Win 2000. Then, those disappeared text
boxes appear and those buttons return above the side.

Anyone knows how to fix such problem? Or should I just update the user
guide to ask user adjust performance settings?

Is it the fact that your program is using getSystemLookAndFeelClassName?
You could try to set the look and feel to
"com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel", which is the
Windows 2000 look.

best,
james
 
R

Roedy Green

When I change the XP performatnce setting under "control panel ->
System -> Advanced -> Performance" to "Adjust to best performance" and
this environment is similar to Win 2000. Then, those disappeared text
boxes appear and those buttons return above the side.

Is this performance adjustment for the video driver? If so it implies
you have a video driver bug. Check with the manufacturer for an
update.
 
J

Jerry

Is com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel availble
since JDK 1.5? I am compiling the code using JDK 1.4.2 and it failed to
recognize com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel.
Using JDK 1.5, seems O.K..

Thanks,

Haoming
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top