Wednesday, 2 October 2013

resizable layout swing when disappears JPanel

resizable layout swing when disappears JPanel

pI have many jPanel (panelF) that are added in other jPanel(panelB).
jPanelF contain jPanelC. img src=http://i.stack.imgur.com/U1vts.png
alt=enter image description here/p pI have set the layout to add them as
follows:/p precode PanelB.setLayout(new BoxLayout(this.PanelB,
BoxLayout.PAGE_AXIS)); PanelF panelF1 = new PanelF(); PanelB.add(panelF1);
PanelF panelF2 = new PanelF(); PanelB.add(panelF2); /code/pre pI set
visible false in jPanelC1. But JPanelF2 preserves distance and not want to
make that blank space/p pimg src=http://i.stack.imgur.com/NTSR3.png
alt=enter image description here What I want is that when disappearing
JPanelC1. Distance is maintained between the jPanelF and not be a white
space. I tried validate() and change the layout but I fail. What would be
the way? Thank you very much. Sorry for my English/p pknow if there are
something like $(#panelC1).fadeOut(slow)? would be ideal./p

No comments:

Post a Comment