Repaint « Container « Java Swing Q&A





1. How do I force a container to repaint?    coderanch.com

Just to enhance the question... I tried to use update(Graphics) (after resetting hgap) and adding my own paint(Graphics) method but then the effect of changing hgap is visible only after window is resized (and after going out of focus and back to clear clutter). Sorry for trivial question but I cannot seem to find the answer in books that I have. ...

2. container Repaint problem    coderanch.com

In my application i am using the same window and change the components at various button events using remove(),revalidate() and repaint(). in this code i am i have three different methods 1. initialWindow() 2. actionPerformed() in SubmitHandler class (inner class to SCJPTestApplication class) 3. actionPerformed() in BeginTest class (inner class to SCJPTestApplication class) the initialWindow () method displays the initial window ...