Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Gui Problem from Netbeans  RSS feed

 
Cristian Popovici
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ppl,
I am new to guis in java. I have used netbeans to design my gui. Everything works fine when I am running the project from netbeans, but when i run my jar file like this , the gui has different look and feel and the components doesn't behave properly.

Any idea?

Thanks and have a good day!
Cristi.
 
Andrei Pat
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not use NetBeans for gui design, but you can set the look and feel that you like programmatically, by using the UIManager.setLookAndFeel method. See more details here
 
Darrin Cartwright
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cristian,

Add the following line before your call to initComponents();



Just change the Look and Feel class name string to the one you want to use.

Darrin
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!