The web site:

http://java.sun.com/products/jfc/tsc/special_report/painting/painting.html#swing

gives a good explanation of how painting and swing work.

>>> Satish Annapureddy <[EMAIL PROTECTED]> 10/06 11:01 AM >>>
Hi,

I am new to Java2D and am wondering if there are any
issues with using Graphics2D with Swing  components.

In the example code attached below,
I have a JPanel whose paintComponent() method is overridden
to use Graphics2D  to just draw a rectangle and a piece of text.
When the window gets obscured and then exposed, I see some
artifacts.

However, if I use AWT Canvas instead of JPanel, the repainting works
as expected.

Also, I noticed that the Java2D demos override paint() method
on DemoSurface
which is a subclass of JPanel. Shouldn't they be overriding
paintComponent()
instead?

I am using Blackdown's Linux port for Java version: 1.2 on Intel
platform.

Thanks,
Satish.

===========================================================================
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".

Reply via email to