Win a copy of Murach's Python Programming this week in the Jython/Python 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
Sheriff
Posts: 53773
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why have you got so many fields?
Put the initialisation in the constructor.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!