You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Strigun (JIRA)" <ji...@apache.org> on 2007/09/19 10:29:43 UTC
[jira] Commented: (HARMONY-4814) [classlib][awt] method
Graphics.clearRect works incorrectly
[ https://issues.apache.org/jira/browse/HARMONY-4814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528689 ]
Vladimir Strigun commented on HARMONY-4814:
-------------------------------------------
Thanks Alexey,
patch applied as expected.
> [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
> Assignee: Alexey Petrenko
> Attachments: Harmony-4814.diff
>
>
> 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));
> setTitle("TestClearRect");
> this.addMouseListener(this);
> this.setVisible(true);
> }
>
> public void paint(Graphics g)
> {
> super.paint(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)
> {
> testclearRect();
> }
> else if (e.getButton() == MouseEvent.BUTTON3)
> {
> System.exit(0);
> }
> }
> 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.