M
matt
I currently have an application that uses JFrames and the javax.swing
library for its GUI. I am trying to create a shopping cart where there
is a Basic and Expanded setting. The Basic Setting simply tells them
the cost of several different items and they are able to click an
Expand button that will show them more details. The way I am
accomplishing this is 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. 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. I think it has
something to do with the repaint() method???
For Reference: I am using a TableLayout class I found on Google as my
LayoutManager
Thanks,
Matt
library for its GUI. I am trying to create a shopping cart where there
is a Basic and Expanded setting. The Basic Setting simply tells them
the cost of several different items and they are able to click an
Expand button that will show them more details. The way I am
accomplishing this is 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. 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. I think it has
something to do with the repaint() method???
For Reference: I am using a TableLayout class I found on Google as my
LayoutManager
Thanks,
Matt