Hey guys,

I'm trying to develop a simple tool. I'm having but I'm having trouble accessing some swing components.

My gui basically has a jtabbed pane with two, jbuttons beneath it. Each tab is identical except for the title, it has a jtextarea and two jbuttons. These buttons perform an action on the jtextarea of the tab. The two buttons I mentioned earlier(the ones not in the jtabbed area) perform the same action to every jtextarea on each tab.

This is all built in one class. The tabs are created in a method, using a loop I create x amount of tabs(it's important that it's variable).
I am having trouble figuring out how to perform actions on the jtextareas in each tab? Should I be creating a reference arraylist or something? Or is my design poor? Should I possibly create a new class in which I build the tabs?

5 Years
Discussion Span
Last Post by Zaad

If the variables are defined as class variables, all methods in the class should be able to access them.


its better you post the code on what you have done so far so that we would be able to help based on that

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.