Satish Annapureddy wrote:

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

        You've got to remember that the Blackdown Java 1.2 port is still in
pre-beta status, and has a great number of bugs still  unsolved. Did you
try to run the same code in Windows or Solaris, with the Sun runtime?

--
---------------------------------------------------------------
  Alexandre Sieira Vilar - http://www.tecgraf.puc-rio.br/~asv
 Computer Engineering Student at PUC-Rio - GNU and Linux rock!
     3rd kyu Aikikkai Aikidoka (as of November 28, 1998)
---------------------------------------------------------------
"It  is  neccessary  to develop a strategy that utilizes all
the physical conditions  and  elements  that are directly at
hand.  The best strategy relies upon  an  unlimited  set  of
responses."

                                   Morihei Ueshiba

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