sharing private members for two tabs

hi!

I have JTabbedpane with 6 tabs and two of them, I am sharing same labels, testfields, checkbox and button as private members. I also use same actionPerformed(ActionEvent e) for two tabs; however, one of checkbox's behavior works from one tab and the other doesn't work.

Is it because I am sharing private members for those tabs?
dkim18Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
warturtleConnect With a Mentor Commented:
Hi,

In case, you are interested in sharing behaviour, then do this:

private static JCheckBox check ;

Declare them static, in this way, they will share the behaviour, and hopefully, this should resolve the problem.

Best Regards,

Warturtle
0
 
CEHJCommented:
Make sure the checkbox really is shared
0
All Courses

From novice to tech pro — start learning today.