Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6596915

JCK-runtime-6a/tests/api/java_awt/Component/index.html tesPaintAll fails

XMLWordPrintable

    • b01
    • generic, x86, sparc
    • linux, solaris_2.5.1, solaris_10

        JCK test JCK-runtime-6a/tests/api/java_awt/Component/index.html testPaintAll fails on linux
        Here is the output: http://moonblade.russia.sun.com/set/java/jck/qa-results/jdk_results/jdk7/b16/JCK6a/runtime-SUSE10-x86-client-Xint-Xconcgc-Xbatch-Xdebug/workDir/api/java_awt/Component/index.jtr

        A standalone test is written and it seem reproduces the problem on Ubuntu Linux with GNOME.
        import java.awt.*;
        import javax.swing.*;
        import java.awt.image.BufferedImage;

        public class TestPaintAll {

            public static void main(String [] args) throws Exception {

                    Component lwComponentStub;
                    Button hwComponentStub;
                    Frame frame;

                        lwComponentStub = new Component(){
        public void paint(Graphics g) {
        System.out.println("LW paint() call");
                                }
        };

                        hwComponentStub = new Button(){
        public void paint(Graphics g) {
        System.out.println("HW paint() call");
                                }
        };
                        BufferedImage graphicsProducer =
                            new BufferedImage(BufferedImage.TYPE_INT_ARGB,1,1);
                    
                        Graphics g = graphicsProducer.getGraphics();
                        

                        frame = new Frame();
                        frame.setLayout(new GridLayout());
                        frame.add(lwComponentStub);
                        frame.add(hwComponentStub);
                        frame.setSize(new Dimension(50,50));
                        frame.setVisible(true);

        System.out.println("1-------------------");
        Thread.sleep(3000);
        System.out.println("2-------------------");

                        frame.paintAll(g);
                       //frame.paintAll(frame.getGraphics());
            }
        }

        On Linux it prints:
        1-------------------
        LW paint() call
        LW paint() call
        HW paint() call
        2-------------------

        On Windows it prints:
        1-------------------
        LW paint() call
        HW paint() call
        2-------------------
        LW paint() call
        HW paint() call

        On Linux with Motif enabled it prints:
        1-------------------
        LW paint() call
        LW paint() call
        HW paint() call
        2-------------------
        LW paint() call
        HW paint() call

              serb Sergey Bylokhov
              dav Andrei Dmitriev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: