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

JFrame does not paint content in XVFB / X11vnc environment

    XMLWordPrintable

Details

    • b25
    • b24
    • x86_64
    • linux_ubuntu
    • Not verified

    Backports

      Description

        ADDITIONAL SYSTEM INFORMATION :
        Ubuntu Server with openssh, xvfb, x11vnc, Eclipse 2018-12, Java Version 11.0.1

        A DESCRIPTION OF THE PROBLEM :
        JFrames have no content in an XVFB / x11vnc environment with java 11. They open up and can be moved around, but they do not paint the content. The sample provided worked with a java 8 environment.

        REGRESSION : Last worked in version 8u181

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
         * Set up VM with above config, or use the container from: https://hub.docker.com/r/inetsoftware/ubuntu-x11-eclipse/
         * Create a new Java Project with provided source code
         * Download 11.0.1 JDK and set up as run configuration
         * Run the Example


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        A Frame with the Text "tada" should open
        ACTUAL -
        An empty frame opens

        ---------- BEGIN SOURCE ----------
        import javax.swing.JFrame;
        import javax.swing.JLabel;

        public class FrameCheck {

        public static void main(String[] args) {
        JFrame frame = new JFrame("FrameCheck");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(400, 300);
        frame.getContentPane().add(new JLabel("tada"));
        frame.setVisible(true);
        }

        }

        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        There is no workaround. Running the code with java 8 works as expected

        FREQUENCY : always


        Attachments

          1. docker-file-with-testcase.zip
            4 kB
          2. FrameCheck.java
            0.3 kB
          3. non_working.png
            non_working.png
            90 kB
          4. screenshot.png
            screenshot.png
            4 kB
          5. working.png
            working.png
            91 kB

          Issue Links

            Activity

              People

                dmarkov Dmitry Markov
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: