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

Rendering artifacts with X11 rendering pipeline

XMLWordPrintable

    • 2d
    • x86
    • linux

      FULL PRODUCT VERSION :
      java version "1.7.0_147-icedtea"
      OpenJDK Runtime Environment (IcedTea7 2.0) (7~b147-2.0-0ubuntu0.11.10.1)
      OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux ubuntu-workstation 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Nvidia graphics driver version: 290.10

      A DESCRIPTION OF THE PROBLEM :
      With the default X11 rendering pipeline, scrolling a horizontal scrollpane with whatever contents you like (e.g. a JTable) will produce rendering artifacts.
      This happens as well with oracle jdk 1.6u30 and openjdk 1.6.

      Problem can easily be reproduced with a slight modification of the TableDemo in SwingSet2, as shown below.

      Workaround: Use opengl rendering pipeline by passing -Dsun.java2d.opengl=true to the jvm.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Take the source code of demo program jfc/SwingSet2: TableDemo.java and modify it as indicated below.
      2. Run the application, resize the table's columns so that the table will become larger than its scrollpane container.
      3. Scroll table right and left with the horizontal scrollbar.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      At the end of createTable(), modify the demo code as follows:


      tableView.setRowHeight(INITIAL_ROWHEIGHT);
      tableView.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); // *** insert this line
      scrollpane = new JScrollPane(tableView, // *** change this line
                  JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                  JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);

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

      CUSTOMER SUBMITTED WORKAROUND :
      Start the jvm with -Dsun.java2d.opengl=true

            pnarayanan Prahalad Kumar Narayanan (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: