event handling

I have a class A ( which is a JFram with card layout ). Two other classes B and C ( both are JPanels ). Class A initially displays an instance of the class B in its content pane. When a button is hit in the class B, I want to change the contents of the content pane of class A and display an instance of class C in it. Please tell me how can we do this. On possibility is to make B and C inner class of Class A, so that they can access the cardlayout object of the class A to change the object it displays. Any other way of doing this?

Thanks.

[557 byte] By [BitsLovera] at [2007-11-27 10:53:13]
# 1

it is very easy to do, first goes thro' the examples of using cardlayout

and call show (...)method of CardLayout in the actionPerformed() method.

nirgun_xyza at 2007-7-29 11:42:45 > top of Java-index,Desktop,Core GUI APIs...