Hi Piet,

I found another problem.
With this exemple (keep the window small), you would expect to see something 
like an oval. There is some extra, which shouldn't be there.

[code]
public class TestBorder extends JPanel{
    private int borderSize = 50;
    private int round = 90;
    public TestBorder(){

    }

    public void paintComponent(Graphics g){
        Graphics2D g2 = (Graphics2D) g.create();
        g2.setColor(Color.black);
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 
RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setStroke(new BasicStroke((float) borderSize));
        g2.drawRoundRect(borderSize / 2, borderSize / 2, getWidth() - 
borderSize - 5, getHeight() - borderSize - 5, round, round);
//        g2.drawOval(borderSize / 2, borderSize / 2, getWidth() - borderSize, 
getHeight() - borderSize);
        g2.dispose();
    }

    public static void main(String args[]){
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                TestBorder tst = new TestBorder();
                JFrame jf = new JFrame();
                jf.setSize(150, 150);
                jf.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                jf.add(tst);
                jf.setVisible(true);                
            }
        });
    }
}
[/code]

Thanks,

Olivier
[Message sent by forum member 'odoremieux' (odoremieux)]

http://forums.java.net/jive/thread.jspa?messageID=341953

===========================================================================
To unsubscribe, send email to lists...@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
lists...@java.sun.com and include in the body of the message "help".

Reply via email to