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

Large JTables are not rendered correctly with sun.java2d.xrender=True

    XMLWordPrintable

Details

    • 2d
    • b66
    • x86
    • linux

    Description

      FULL PRODUCT VERSION :
      java version "1.7.0_01"
      Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
      Java HotSpot(TM) Server VM (build 21.1-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Linux io 2.6.37.6-0.7-desktop #1 SMP PREEMPT 2011-07-21 02:17:24 +0200 x86_64 x86_64 x86_64 GNU/Linux

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Version of libXrender: 0.9.6-6.1
      Version of nvidia driver: 275.21-7.1

      A DESCRIPTION OF THE PROBLEM :
      When using the xrender java2d pipeline large JTables embedded in a JScrollPane are not rendered correctly. Using the example attached to this report, on my system, the first problems are visible at row index 2051. The problem disappears at row index 4096. The problem is visible again at row index 6170 and disappears again at row index 8192. The problem is visible again at row index 10266 and disappears at row index 12288.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile and run the example attached to this report. Scroll down the table and look for table cells not painted correctly.

      javac TableTest.java
      java -Dsun.java2d.xrender=True TableTest

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No paint problems are visible. All cells are rendered correctly.
      ACTUAL -
      Some table rows are not rendered correctly (see description above).

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;
      import javax.swing.event.*;
      import javax.swing.table.*;

      public class TableTest {
          public TableTest() {
          }

          private static void createAndShowGUI() {
              JFrame frame = new JFrame("TableTest");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JTable table = new JTable(new MyTableModel());
              JScrollPane scrollPane = new JScrollPane(table);
              frame.add(scrollPane);
              frame.pack();
              frame.setVisible(true);
          }

          public static void main(String[] args) {
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                  public void run() {
                      createAndShowGUI();
                  }
              });
          }

          private static final class MyTableModel extends AbstractTableModel {
              public int getRowCount() {
                  return 20000;
              }
          
              public int getColumnCount() {
                  return 4;
              }
          
              public Object getValueAt(int row, int column) {
                  final String val = row + "_" + column;
                  return val;
              }
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Don't use xrender java2d pipeline

      Attachments

        Issue Links

          Activity

            People

              prr Philip Race
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: