We take pride in your success. We let our positivity drive us, day in and out. Talk to us at Mindfire to know us more.

Software Technology Tips

Java developers often need to use graphics and drawing APIs. Due to limited capability of Java SDK, Microsoft's DirectX API (DirectDraw or ddraw) on Window machine results into drawing problems when using external graphics accelerator card and thus Swing component drawing starts flickering.

The work around to this problem is to set ddraw flag off. There are separate methods to disable this flag in Java Application and in Java Applet.

1) For Java Application:

Either add below line in main function as the first line:
 
System.getProperties().Put("sun.java2d.noddraw", "true");
                                        OR
Use the below option in command prompt to run a Jar file:

java -Dsun.noddraw=true -jar examle.jar

2) For Java Applet 
 
In Applet to make ddraw flag off user has to set the Java Runtime Parameters in Java plug-in control panel by.
For Java Versions lesser than 6.0 :
 
Go to Control Panel > Java Plug-in > Advanced and enter "-Dsun.java2d.noddraw=true" (without quotes)
 into the Java Runtime Parameters test box.
 
For Java plug-in versions higher than 6.0 :
 
Go to Control Panel > Java Plug-in > Java then click "view" and enter "-Dsun.java2d.noddraw=true" (without quotes) into the Java Runtime Parameters text box.


Related Tags:

Java, Java Swing Drawing, Direct Draw, ddraw, Graphics accelerator

Author: Akhil Kumar

top

Related Pages

  • Java Development Expertise
  • JSP/Servlets Development Projects

Java

Let us Connect!

privacy

copyright (c) Mindfire Solutions 2007-2012. Login