• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Swing forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!