harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Strigun (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4814) [classlib][awt] method Graphics.clearRect works incorrectly
Date Tue, 18 Sep 2007 16:16:43 GMT
[classlib][awt] method Graphics.clearRect works incorrectly 

                 Key: HARMONY-4814
                 URL: https://issues.apache.org/jira/browse/HARMONY-4814
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Vladimir Strigun

Here is the testcase for reproducing the issue:

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Font;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JFrame;

public class TestClearRect extends JFrame implements MouseListener
	public TestClearRect()
		this.setBounds(new Rectangle(100, 100, 740, 580));
		this.setBackground(new Color(0, 0, 255));
	public void paint(Graphics g)
        g.setFont(new Font("", Font.BOLD, 22));
		g.drawString("Click left mouse button to invoke clearRect method ", 10, 100);
	public void mouseClicked(MouseEvent e){}

	public void mousePressed(MouseEvent e)
		if (e.getButton() == MouseEvent.BUTTON1)
		else if (e.getButton() == MouseEvent.BUTTON3)

	public void mouseReleased(MouseEvent e){}

	public void mouseEntered(MouseEvent e){}

	public void mouseExited(MouseEvent e){}
	private void testclearRect()
		Graphics g = this.getGraphics();
		g.clearRect(0, 0, this.getWidth(), this.getHeight());
	public static void main(String[] args)
		new TestClearRect();

On RI after mouse click, background color changed to blue, while on Harmony it changed to
black (default value).

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

View raw message