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

How can I make the field initialized before the initComponents method is called?  RSS feed

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application is undergoing a major overhaul after the demo
The lblCustomerID is null when being added to the GradientPanel which is a JPanel with Database and
decoration support.
Thanks
Jack
 
Campbell Ritchie
Marshal
Posts: 55698
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why have you got so many fields?
Put the initialisation in the constructor.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!