Search |
||
Swing team reveals their secrets !Posted by alexfromsun on April 1, 2006 at 12:00 AM PST
Everybody knows that Swing and AWT behaviour can be changed with command line properties, swing.defaultlafsee here for more info, e.g. the following command: java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel <YourApp> allows you to have the Windows LaF to be set for your application by default; java.awt.headlesswhich switches your application to a mysterious headless mode (don't try it at home, by the way) But the same time it is not widely known that Swing has much more exciting undocumented properties, and even Swing team members are not aware of the complete list of them. You might spend a lot of time implementing a feature, and after that bump into the property wich can solve the problem straight away Remember the famous grayrect improvement which is implemented for Mustang? It turned out that the the only thing you should do to solve the problem is set the swing.grayrect.colorfrom Gray (it was the default value) to Transparent, with: java -Dswing.grayrect.color=Transparent your will never see the gray rect and what is the most interesting that it works even for java 1.1 ! if you don't like the grayrect to be transparent, you can fill it with you favourite color, swing.grayrect.color=Violet turns the boring grayrect to a beautiful Violet ! Here the list of additional properties, with valid values which are devided with | symbol, the default value marked with asterisk:
swing.runtwiceasfast=true*|falseMake the Swing two times faster
swing.completeleremoveawt=true|false*This one is in progress, AWT team doubts that we really need it
swing.bugsnumber=ALOT | MEDIUM | AFEW* | NONENONE value is not completely tested yet,
so I don't recommend trying it out
java2d.speedofpainting=LOW | MEDIUM | FAST* | UNIMAGINABLEIf you set UNIMAGINABLE value for this property the Swing components will be painted so fast that it will hardly be possible to notice them
I am absolutely sure that there are more properties to be added in this list, »
Related Topics >>
Swing Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|