Hi Walter,
On Fri, Feb 06, 2004 at 12:42:15PM -0600, Walter H Shirey wrote:
> I'm having problems trying to figure out how to redraw a JPanel with
> custom graphics after a JDialog, displayed on top of the JPanel, has
> been disposed of. Also having the same problem when the window has lost
> focus or been maximized after being minimized to toolbar.
>
> If I overwrite the paintComponent() method of the JPanel, will Java know
> to paint the JPanel after the JDialog has been disposed, or if focus has
> returned to the window? Or do I have to implement focusListeners with
> the paintComponent() method?
Swing/AWT will figure out which part needs to be redrawn and will
call paintComponent with the appropriate clip. So, all you need to
do is repaint your component in paintComponent (you might want to
check the clip bounds to optimize rendering).
Thank you,
Dmitri
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".