Results 1 to 2 of 2
Thread: Redrawing the grid bag layout
- 06-22-2010, 05:10 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 2
- Rep Power
- 0
Redrawing the grid bag layout
Hi All,
I have a requirement in which I want to redraw a gridbaglayout panel based on a radio button selection. Can someone suggest me how to achieve this? Initially, the screen will look like this -
<Radio button 1>
<Radio button 2>
<Radio button 3>
On selection of radio button 2, I should show -
<Radio button 1>
<Radio button 2>
<JPanel 1>
<Radio button 3>
On selection of radio button 3, I should show -
<Radio button 1>
<Radio button 2>
<Radio button 3>
<JPanel 2>
On selection of radio button 1, I should show -
<Radio button 1>
<Radio button 2>
<Radio button 3>
What is the best way to achieve this? I was thinking of card layout for the entire screen (and switch between 3 UIs based on button selection), but that requires me to maintain 3 different instances of the 3 radio buttons (since the button click can happen in any order). Can someone please suggest me better method?
Thanks,
Preethi
- 06-22-2010, 05:23 AM #2
Senior Member
- Join Date
- May 2010
- Posts
- 436
- Rep Power
- 4
Can you do one or both of these recommendations?
1) Post screen shots showing exactly the effect that you are trying to achieve.
2) Post a very small compilable program that demonstrates your problem, a program that we can compile and run without any dependencies.
Also, have you tried a simple setVisible(true/false)? for the JPanel?
Similar Threads
-
Grid Layout with paintComponent
By mp06677 in forum New To JavaReplies: 1Last Post: 03-06-2010, 01:20 PM -
Help redrawing large image
By mountaindew4993 in forum Java AppletsReplies: 4Last Post: 12-14-2009, 11:49 PM -
Grid layout frames GUI
By fritz1474 in forum AWT / SwingReplies: 1Last Post: 10-15-2008, 02:04 AM -
problem in redrawing JTable
By abhinav in forum AWT / SwingReplies: 0Last Post: 11-21-2007, 09:08 PM -
Help with Grid Layout
By coco in forum AWT / SwingReplies: 1Last Post: 08-06-2007, 08:03 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks