-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
beta
-
generic, x86
-
generic, windows_nt
Name: skT88420 Date: 08/31/99
I looked at the bug-base where many similar bugs are said to be fixed. But the following code still paint twice when created for resized:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class bug1 extends JApplet
{
//----------------------------------------------------------------
public void paint(Graphics g)
{
Graphics2D g2 = (Graphics2D) g;
Dimension d = getSize();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
g2.setBackground(Color.white);
g2.clearRect(0, 0, d.width, d.height);
for (int i=0;i<50;i++) // make this loop slow enough to see the re painting
{ g2.fillOval(i*5,i*4,20,20);
double x=0;
for (int j=0;j<1000000;j++) { x=j; x = x*x*x*x/1e20*x*x*x;}
}
}
//----------------------------------------------------------------
public static void main(String[] argv)
{ final bug1 jz_graph_2d = new bug1();
JFrame f = new JFrame("bug1");
f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) {System.exit(0);} } );
f.getContentPane().add(jz_graph_2d);
f.pack();
f.setSize(new Dimension(500,400));
f.show();
}
}
//----------------------------------------------------------------
(Review ID: 94677)
======================================================================
- duplicates
-
JDK-4395515 You should coalesce PAINT and UPDATE events to make java faster
-
- Closed
-
- relates to
-
JDK-4394287 Frame.setBounds causes Frame.repaint to fail until PaintEvent.PAINT dispatched
-
- Closed
-