I have a multiple interlframes application. Each internalframe has a deskpane. in each deskpane there is a button. This button will be used to colapse or expand the frame when pressed. I am internally tracking the status of each buttons icon. I am tracking the current activated frame in field currentframe, I also am tracking the internalframe number internally in field currentframenumber (using the frame name for identification).
My currentframe field is defined as JInternalFrame.
The problem is that when a button is pressed only the last frames button's icon is changed. How can I change the currentframe button instead?
Somehow I should be able to use the currentframe field in conjunction with the DownUpButton.
Here is the code that is being called from the listener within the internal frame:
private void changeFrameSize(){
if (downuptracker[currentframenumber].equals(true)){
// Colapse frame here and change icon
DownUpButton.setIcon(new ImageIcon( getClass().getResource("DropDown.GIF")));
downuptracker[currentframenumber] = false;
}else{
// Expand frame here and change icon
DownUpButton.setIcon(new ImageIcon( getClass().getResource("DropUp.GIF")));
downuptracker[currentframenumber] = true;
}
}
Thank you in advance,
BAJH