Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / March 2005

Tip: Looking for answers? Try searching our database.

ANNOYING BUG: Swing producing blank windows

Thread view: 
Alex - 16 Mar 2005 00:26 GMT
Anyone else having a problem where Swing windows appear blank?
Sometimes, if I'm very lucky, the controls will be drawn when the
window first appears, but they don't get redrawn when obscured by
other windows.

I know there are workarounds for programmers who are writing the code,
but when this bug is affecting applications (the source code of which
I do not have access to) it's very frustrating. The Control Panel
applet for Java settings suffers from the same problem, as did the JDK
installer!

I'm using Windows XP Home Edition SP2 on an ATI Radeon graphics card
(not that the graphics drivers should affect the order in which Swing
draws the GUI, but you never know).
John - 16 Mar 2005 06:10 GMT
I had that problems once on a SUN machine running Solaris 7.
The problem was with the installation of the JDK.
Try reinstalling JDK. You can also try using a generic driver for your
graphics card
insteadof the ATI driver and see if it works.

> Anyone else having a problem where Swing windows appear blank?
> Sometimes, if I'm very lucky, the controls will be drawn when the
[quoted text clipped - 10 lines]
> (not that the graphics drivers should affect the order in which Swing
> draws the GUI, but you never know).
John - 16 Mar 2005 06:15 GMT
Maybe this will help:

In article <CCGZd.229$_u3.217@newsfe2-gui.ntli.net>, Joe T
<joet@nospam.com> wrote:

>>Due to an incompatibility with the graphics card on my laptop,
>>Java gui applications do not display or function correctly.
>>
>>I have found that this can be fixed by adding the switch
>>"-Dsun.java2d.d3d=false" when calling a java application

>from the command line.

>>Is there any way to set this as a default switch when running
>>any Java application?
>>
>>Thanks in advance,

Not that I know of - but on Linux/Unix you can use an alias, on windows, a
batch file, to invoke Java with the switch.

Eric

> Anyone else having a problem where Swing windows appear blank?
> Sometimes, if I'm very lucky, the controls will be drawn when the
[quoted text clipped - 10 lines]
> (not that the graphics drivers should affect the order in which Swing
> draws the GUI, but you never know).
Alex - 16 Mar 2005 13:29 GMT
>Maybe this will help:
>
[quoted text clipped - 18 lines]
>
>Eric

Thanks. It works perfectly now.

Setting Windows to use that switch every time the VM is invoked (such
as launching a .jar file) presents a slight problem, but nothing that
can't be solved by displacing the existing java.exe and javaw.exe
files with a custom launcher...
martychen - 19 Mar 2005 20:39 GMT
Actually I met the same thing yesterday and stumbled accross your
message.  My problem is: After days of not using Swing based
applications, yesterday I found that the application window of Swing
applications are plain grey/blank, even including the Java Web Start
program installed with JRE (Which is also Swing based).  The more
annoying thing is that after trying some swing applications my computer
would hang and reboot!

I tried to reinstall JRE and JDK but the problem was still there.  But
this time I found that: although the window is shown blank, the
application itself seems usable -- I could use the keyboard shortcuts
defined in my application to actually do something.  Now this seem to
me more like a display problem rather than a java installation problem.
And I recalled that a few days ago updated my Radeon 9800 driver to
the latest 5.3 catalyst and made a few changes to the acceleration
settings.

And bingo!  The problem turns out to be caused by the video
acceleration settings I had in catalyst.  Just try to turn down your
acceleration setting from probably "hight quality" to "performance" and
the Swing problem hopefully will also go away.

Cheers!

> Anyone else having a problem where Swing windows appear blank?
> Sometimes, if I'm very lucky, the controls will be drawn when the
[quoted text clipped - 10 lines]
> (not that the graphics drivers should affect the order in which Swing
> draws the GUI, but you never know).


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.