Question: Gui Looks Different  
Author Message
Ken Browning





PostPosted: 2007-8-15 22:39:00 Top

java-programmer, Question: Gui Looks Different I am a fairly new java developer, so the answer to my question may be
obvious to the veterans, but it is not obvious to me, so here goes. I
have an application that has several progress bars and other guid
widgets in it. On the system (a desktop with CRT) where the code was
developed the GUI looks normal. If I run the same code on my laptop,
the app still runs but the GUI is not drawn correctly. Is there a fix
(easy or otherwise) for this? Many thanks in advance,
Ken Browning
 
Karsten Lentzsch





PostPosted: 2007-8-15 23:05:00 Top

java-programmer >> Question: Gui Looks Different Ken,

> [...] On the system (a desktop with CRT) where the code was
> developed the GUI looks normal. If I run the same code on my laptop,
> the app still runs but the GUI is not drawn correctly. Is there a fix
> (easy or otherwise) for this? [...]

The Look&Feel differs with the Java version you're using.
Sun has improved the Windows and cross-platform L&fs
with every version; the newer the better.

I provide the free JGoodies Windows L&f that is based
on the Sun Windows L&f. It corrects a bunch of issues
Sun's Windows L&f and adds some options. Find more
information here: https://looks.dev.java.net/

-Karsten Lentzsch
 
Ken Browning





PostPosted: 2007-8-15 23:20:00 Top

java-programmer >> Question: Gui Looks Different The Java SDK/JRE versions (the latest from the Sun web site) are the
same on both machines, so there is no difference there.

On Wed, 15 Aug 2007 17:04:56 +0200, Karsten Lentzsch
<email***@***.com> wrote:

>Ken,
>
>> [...] On the system (a desktop with CRT) where the code was
>> developed the GUI looks normal. If I run the same code on my laptop,
>> the app still runs but the GUI is not drawn correctly. Is there a fix
>> (easy or otherwise) for this? [...]
>
>The Look&Feel differs with the Java version you're using.
>Sun has improved the Windows and cross-platform L&fs
>with every version; the newer the better.
>
>I provide the free JGoodies Windows L&f that is based
>on the Sun Windows L&f. It corrects a bunch of issues
>Sun's Windows L&f and adds some options. Find more
>information here: https://looks.dev.java.net/
>
>-Karsten Lentzsch

 
 
Thomas Kellerer





PostPosted: 2007-8-15 23:33:00 Top

java-programmer >> Question: Gui Looks Different

Ken Browning wrote on 15.08.2007 16:38:
> I am a fairly new java developer, so the answer to my question may be
> obvious to the veterans, but it is not obvious to me, so here goes. I
> have an application that has several progress bars and other guid
> widgets in it. On the system (a desktop with CRT) where the code was
> developed the GUI looks normal. If I run the same code on my laptop,
> the app still runs but the GUI is not drawn correctly. Is there a fix
> (easy or otherwise) for this? Many thanks in advance,
> Ken Browning

I assume you are using a Windows computer. In that case problems with painting
in Java are most of the time caused by problems in the graphics driver. Try
running your application with -Dsun.java2d.noddraw=true to turn off the usage of
DirectDraw in Java. That might fix your problems. If it doesn't try to upgrade
your graphics driver on the laptop.

Thomas
 
 
Karsten Lentzsch





PostPosted: 2007-8-15 23:57:00 Top

java-programmer >> Question: Gui Looks Different Ken Browning wrote:

> The Java SDK/JRE versions (the latest from the Sun web site) are the
> same on both machines, so there is no difference there.

Sure? And the classpath is the same?

The Sun (and JGoodies) Windows L&f aim to honor
the desktop settings including the theme, font
rasterizer algorithm and some fonts.

What are the differences you're seeing?
You may provide two screenshots, so we can
see the differences.

-Karsten
 
 
Roedy Green





PostPosted: 2007-8-16 0:44:00 Top

java-programmer >> Question: Gui Looks Different On Wed, 15 Aug 2007 09:38:36 -0500, Ken Browning
<email***@***.com> wrote, quoted or indirectly quoted someone who
said :

> On the system (a desktop with CRT) where the code was
>developed the GUI looks normal. If I run the same code on my laptop,
>the app still runs but the GUI is not drawn correctly.

I trust you used a layout, not absolute positioning.
See http://mindprod.com/jgloss/layout.html

If you didn't, you are coding for only one machine.

Does one of the machines have a larger default font configured?. This
can confuse.

See http://mindprod.com/jgloss/ruler.html
to get a Mioplanet software ruler to measure the heights and widths of
various things in pixels to see exactly what is wrong.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com