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

JTabe always reported as empty by VoiceOver

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8u51, 9
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_51"
      Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
      Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      OS X Yosemite Version 10.10.4




      A DESCRIPTION OF THE PROBLEM :
      Using VoiceOver on Mac OS X JTables are always reported as 'empty'.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached program on OS X. Hit Cmd + F5 and you'll hear the table be reported as empty.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Table should be reported as having 2 rows and 5 columns.
      ACTUAL -
      Table is reported as empty.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------

      import javax.swing.JFrame;
      import javax.swing.JTable;
      import javax.swing.SwingUtilities;

      public class TableDemo extends JFrame
      {
          private static final long serialVersionUID = 1L;

          public TableDemo()
          {

              super("Accessible JTable?");

              final String[] columnNames =
                  {
                      "First Name",
                      "Last Name",
                      "Sport",
                      "# of Years",
                      "Vegetarian"
                  };
              final Object[][] data =
                  {
                      {"Kathy", "Smith", "Snowboarding", new Integer(5), new Boolean(false)},
                      {"John", "Doe", "Rowing", new Integer(3), new Boolean(true)},
                  };
              
              final JTable jTable = new JTable(data, columnNames);
              jTable.getAccessibleContext().setAccessibleName("data table");
              System.out.println("rows: " + jTable.getAccessibleContext().getAccessibleTable().getAccessibleRowCount());
              System.out.println("cols: " + jTable.getAccessibleContext().getAccessibleTable().getAccessibleColumnCount());
              System.out.println("cols: " + jTable.getAccessibleContext().getAccessibleTable().getAccessibleRowDescription(0));
              
              System.out.println("java: " + System.getProperty("java.version"));
              jTable.setOpaque(true);
              setContentPane(jTable);
          }
          
          
          private static void createAndShowGUI()
          {
              final TableDemo frame = new TableDemo();
              frame.pack();
              frame.setVisible(true);
          }

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

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aivanov Alexey Ivanov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: