18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.AWTException;
25 import java.awt.Color;
26 import java.awt.Component;
27 import java.awt.Frame;
28 import java.awt.Graphics;
29 import java.awt.Label;
30 import java.awt.Point;
31 import java.awt.Robot;
32 import java.awt.Toolkit;
33
34 import sun.awt.SunToolkit;
35
36 /**
37 * @test
38 * @bug 7157680
39 * @author Sergey Bylokhov
40 */
41 public final class PaintNativeOnUpdate extends Label {
42
43 private boolean fullUpdate = true;
44
45 public static void main(final String[] args) throws AWTException {
46 final Frame frame = new Frame();
47 final Component label = new PaintNativeOnUpdate();
48 frame.setBackground(Color.RED);
49 frame.add(label);
50 frame.setSize(300, 300);
51 frame.setUndecorated(true);
52 frame.setLocationRelativeTo(null);
53 frame.setVisible(true);
54 sleep();
55 label.repaint();// first paint
56 sleep();
57 label.repaint();// incremental paint
|
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.AWTException;
25 import java.awt.Color;
26 import java.awt.Component;
27 import java.awt.Frame;
28 import java.awt.Graphics;
29 import java.awt.Label;
30 import java.awt.Point;
31 import java.awt.Robot;
32 import java.awt.Toolkit;
33
34 import sun.awt.SunToolkit;
35
36 /**
37 * @test
38 * @key headful
39 * @bug 7157680
40 * @author Sergey Bylokhov
41 */
42 public final class PaintNativeOnUpdate extends Label {
43
44 private boolean fullUpdate = true;
45
46 public static void main(final String[] args) throws AWTException {
47 final Frame frame = new Frame();
48 final Component label = new PaintNativeOnUpdate();
49 frame.setBackground(Color.RED);
50 frame.add(label);
51 frame.setSize(300, 300);
52 frame.setUndecorated(true);
53 frame.setLocationRelativeTo(null);
54 frame.setVisible(true);
55 sleep();
56 label.repaint();// first paint
57 sleep();
58 label.repaint();// incremental paint
|