> I currently have an application that uses JFrames
..
> ..having 2 separate JPanels (basic and expanded)
> and then when the user clicks the expand button i remove the basic
> panel and then add the expanded panel in its place.
Sounds like a job well suited to using a CardLayout.
>..This works except
> when it happens the screen remains blank until i minimize and then
> restore the program (I can also resize it) for the changes to appear.
> I am wondering how to draw the changes to the screen.
A call validate() will probably do the trick, but..*
>..I think it has
> something to do with the repaint() method???
Please fix that sticky '?' key.
What happened when you called repaint()?
> For Reference: I am using a TableLayout class I found on Google as my
> LayoutManager
* ..if not, you might need to post an SSCCE
that demonstrates the problem. Note that
to be an SSCCE, you will need to show the
problem in code that uses only classes of
the J2SE - so that TableLayout will have
to go.
Andrew T.
matt - 28 Mar 2007 06:13 GMT
> > I currently have an application that uses JFrames
> ..
[quoted text clipped - 28 lines]
>
> Andrew T.
Validate solved the problem. Thanks Andrew. I'd been wondering about
this problem for a long time.