Solved

sharing private members for two tabs

Posted on 2004-04-02
2
146 Views
Last Modified: 2010-03-31
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?
0
Comment
Question by:dkim18
2 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10742597
Make sure the checkbox really is shared
0
 
LVL 16

Accepted Solution

by:
warturtle earned 50 total points
ID: 10749576
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

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HSSFWorkbook cannot be resolved error 10 69
How to convert String matching to regex in java 4 33
Configure a Bean in an XML file 4 31
jsp login check 12 31
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question