Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 50158 invoked from network); 19 Sep 2007 08:30:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Sep 2007 08:30:10 -0000 Received: (qmail 52565 invoked by uid 500); 19 Sep 2007 08:29:56 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 52551 invoked by uid 500); 19 Sep 2007 08:29:56 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 52542 invoked by uid 99); 19 Sep 2007 08:29:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 01:29:56 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 08:30:03 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 857C071418F for ; Wed, 19 Sep 2007 01:29:43 -0700 (PDT) Message-ID: <12737230.1190190583536.JavaMail.jira@brutus> Date: Wed, 19 Sep 2007 01:29:43 -0700 (PDT) From: "Vladimir Strigun (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-4814) [classlib][awt] method Graphics.clearRect works incorrectly In-Reply-To: <11150012.1190132203511.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.