Resizing a panel that uses a CardLayout

I have a panel (mainPanel) that uses GridBagLayouts.

mainPanel contains two panels:

1- panel1: contains 3 JRadioButtons

2- panel2: uses CardLayout to show 3 panels based on the JRadioButtons selection. (one of the 3 panels (editorPanel) contains a JEditorPane added to a JScrollPane)

Now when im resizing the mainPanel, the JEditorPane in the editorPanel is not resizing.

Is there any way to make the JEditorPane resizable while using cardLayout?

Thanks

[496 byte] By [J_P_Wa] at [2007-10-3 3:25:55]
# 1
do you want the editorPane, or the scrollpane it is in, to resize?post the code of how that particular panel is constructed - a lot dependson the layout manager/s used
Michael_Dunna at 2007-7-14 21:19:02 > top of Java-index,Desktop,Core GUI APIs...
# 2
I need the scrollPane to resize.
J_P_Wa at 2007-7-14 21:19:02 > top of Java-index,Desktop,Core GUI APIs...
# 3
it may depends upon GridBagLayout's constants. check out for that. can you provide a demo of your code, so that it is easy to understand exact picture.:)
Aniruddha-Herea at 2007-7-14 21:19:02 > top of Java-index,Desktop,Core GUI APIs...