Sorry, my comments should have read :
In this scenario I expected the rectangle frame not to show at all.
However, the bottom edge and the right edge are displayed . Any Ideas ??
Thanks
Chris
chris roffler wrote:
>
> Trouble drawing a rectangle. Below is the code for drawing a rectangle
> and a filled rectangle (same rectangle)
> In this scenario the frame on the top and the left side of the rectangle
> does not show up.
> The fill operation 'over' draws the frame. When I switch the draw and
> fill sequence it's ok.
>
> Any ideas ? I am going n��
>
> Thanks
>
> Chris Roffler
> ---------------------------------------------
> import javax.swing.*;
> import java.awt.geom.*;
> import java.awt.*;
>
> public class Chris
> extends
> JPanel
> {
> Rectangle2D r;
>
> public Chris()
> {
> super();
>
> r = new Rectangle2D.Float(10,10, 100,3);
> setBackground(Color.white);
> }
>
> public void paint(Graphics g)
> {
> Graphics2D d2 =(Graphics2D)g;
>
> d2.setBackground(Color.white);
> super.paint(d2);
>
> d2.setColor(Color.black);
> d2.draw(r);
>
> d2.setColor(Color.white);
> d2.fill(r);
>
> System.out.println(r);
>
> }
> }
===========================================================================
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".