harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor V. Stolyarov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5186) [classlib][awt] Graphics.clearRect method works incorrectly
Date Mon, 26 Nov 2007 07:11:43 GMT
[classlib][awt] Graphics.clearRect method works incorrectly
-----------------------------------------------------------

                 Key: HARMONY-5186
                 URL: https://issues.apache.org/jira/browse/HARMONY-5186
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Igor V. Stolyarov


Graphics.clearRect method works incorrectly

Simple reproducer:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*; 

public class ClearRectTest extends JFrame{

    JPanel jpDemoPanel;

    public void init(){
        Color color = Color.black;
        Color bgcolor = Color.white;

        addWindowListener(new WindowAdapter() { 
            public void windowClosing(WindowEvent ev) { 
                System.exit(0); 
            } 
        }); 

        setSize(200, 200);
        setVisible(true);

        jpDemoPanel = new JPanel(){
            public void paint(Graphics g){
                g.clearRect(0, 0, jpDemoPanel.getWidth(), jpDemoPanel.getHeight());

            }
        };

        jpDemoPanel.setBackground(bgcolor);
        jpDemoPanel.setForeground(color);

        add(jpDemoPanel);

        validate();
        repaint();
    }

    public static void main(String[] args) { 
        ClearRectTest crt = new ClearRectTest();
        crt.init();
    } 
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message