Event making change in another file component (Help)

Hi there:

My situation is this: I have a tab with a jPanel, and the jPanel has a button click which will have the same tab displaying a new jPanel instead the old one having that button, I have all these jPanels in individual files. I found it always errors for making this. Can anyone help and thanx in advance.

tab( jpanel1 ( button <click it then it becomes like below> ) )

tab( jpanel2 ( button )

the tab remains the same but the jpanel changes with the event triggered by the button in the jpanel. All the jpanels are in individual class files.

I hope this explains clearly.

Thanx in advance

Message was edited by:

reddragonsmaug

[697 byte] By [reddragonsmauga] at [2007-11-26 18:41:32]
# 1
> I hope this explains clearly.Not sure, but maybe you should be using a [url http://java.sun.com/docs/books/tutorial/uiswing/layout/card.html]Card Layout[/url].
camickra at 2007-7-9 6:15:32 > top of Java-index,Desktop,Core GUI APIs...
# 2
Hei, thanx, but I meant that the event generated by the button in the jpanel and the action affects on the tab of the jpanel belongs to. The action makes the tab to delete the current jpanel and add a new one. The jpanel is in individual class file.
reddragonsmauga at 2007-7-9 6:15:32 > top of Java-index,Desktop,Core GUI APIs...