-
Bug
-
Resolution: Won't Fix
-
P4
-
5.0
-
None
-
sparc
-
solaris_8
Name: spR10137 Date: 10/14/2003
Compile and run simple application. Try to change frame's position
on the screen. Notice, that polygon behaviour depends on it's
position. It looks defferent in left and right parts of the screen.
-------------------- ScreenPos.java --------------------
import java.awt.*;
import java.awt.event.*;
public class ScreenPos extends Frame implements ComponentListener {
int[] xpts = {0x0a, 0x0a, 0x7e00, 0x3c};
int[] ypts = {0x0a, 0x14, 0x32, 0x5a};
Canvas c;
public ScreenPos() {
super("Fill GP Test");
c = new Canvas() {
public void paint(Graphics g) {
g.setColor(Color.black);
g.fillPolygon(xpts, ypts, 4);
}
};
c.setSize(100, 300);
c.setBackground(Color.white);
add(c);
addComponentListener(this);
}
public static void main(String[] args) {
ScreenPos sp = new ScreenPos();
sp.pack();
sp.show();
}
public void componentHidden(ComponentEvent e) {
}
public void componentMoved(ComponentEvent e) {
c.repaint();
}
public void componentResized(ComponentEvent e) {
c.repaint();
}
public void componentShown(ComponentEvent e) {
c.repaint();
}
}
-------------------- end of file --------------------
======================================================================
- relates to
-
JDK-4858912 JCK1.4a-runtime api/java_awt/interactive/GraphicsTests.html#GraphicsTests fails
-
- Closed
-