Duplicate :
|
FULL PRODUCT VERSION : 1.6.0_10-rc-b28 ADDITIONAL OS VERSION INFORMATION : Microsoft Windows XP [Version 5.1.2600] EXTRA RELEVANT SYSTEM CONFIGURATION : ATI Radeon HD 3200 A DESCRIPTION OF THE PROBLEM : Calling "fillRect" of class Graphics2D in XOR-mode takes very very long to return - system seems to hang REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import java.awt.*; import javax.swing.*; /** * * @author Werner */ public class XorFillBugPanel extends JPanel { @Override public void paint(Graphics g) { final Dimension size = getSize(); final Graphics2D g2 = (Graphics2D)g; // Filling in paint mode works fine! g2.setPaint(Color.BLUE); g2.fillRect(0, 0, size.width, size.height); // Filling in XOR mode takes very very long! // about 20 seconds on my machine // program "hangs" in line "g2.fillRect(...." g2.setXORMode(new Color(0x80,0x80,0x80)); g2.setPaint(Color.RED); g2.fillRect(10, 10, size.width-20, size.height-20); g2.setPaintMode(); } public static void main(String[] args) { final JFrame frame = new JFrame(); frame.setTitle("Demonstrate XorFill-bug int 1.6.0_10 RC"); frame.setSize(400,400); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.getContentPane().add(new XorFillBugPanel()); frame.setVisible(true); } } ---------- END SOURCE ----------