Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
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
Sheriff
Posts: 48441
56
  • 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