JPanel repack
- From: "Rob McDonald" <rob.a.mcdonald@xxxxxxxxx>
- Date: 26 Dec 2005 10:42:18 -0800
I'm using a JPanel to hold a variable number of components.
When the number of components changes, I do a JPanel.removeAll() and
then loop through the components doing a JPanel.add().
When I do this, the on-screen display ends up empty. If I then grab
the surrounding frame and change its size, the correct display appears.
I've tried a JPanel.repaint(), but that doesn't help. It looks like I
need to force a more thurough recalculation and redraw, but I'm not
sure how to do that.
I suspect I could do a Frame.pack(), but I'd like to keep it at the
JPanel level if possible.
Any help is appreciated,
Rob
.
- Follow-Ups:
- Re: JPanel repack
- From: Peter
- Re: JPanel repack
- Prev by Date: Re: FlowLayout with maximum right margin
- Next by Date: Re: jTable column width and components size
- Previous by thread: jTable column width and components size
- Next by thread: Re: JPanel repack
- Index(es):