File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes how i can change a swing application LAF by command line parameters ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "how i can change a swing application LAF by command line parameters ?" Watch "how i can change a swing application LAF by command line parameters ?" New topic
Author

how i can change a swing application LAF by command line parameters ?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 550
Hi
Thank you for reading my post.
is there any way to change an application LAF using some command line arguments ?
I luunch the application by using a bat file , just using
java -jar ramina.jar
now i want to change the LAF using some runtime parameter , is it do able ?


Thank you
Balachandran Paranjothimani
Ranch Hand

Joined: Jun 18, 2005
Posts: 43
A simple search on Google shows how:

Specifying the Look and Feel: Command Line

You can specify the look and feel at the command line by using the -D flag to set the swing.defaultlaf property. For example:

java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel MyApp

java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel MyApp


Moderator : <a href="http://groups.yahoo.com/group/OOAD_UML/" target="_blank" rel="nofollow">http://groups.yahoo.com/group/OOAD_UML/</a><br />Home : <a href="http://www.zepho.com" target="_blank" rel="nofollow">http://www.zepho.com</a>
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

Moving to the Swing forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how i can change a swing application LAF by command line parameters ?
 
Similar Threads
TinyLaf in Applet?
how i can change a swing application LAF by command line parameters ?
Window Title Bar Text Resizing
which swing look and feel you prefer ?
Swing application font issue