-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8u51, 9
-
x86
-
os_x
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 ----------
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 ----------
- duplicates
-
JDK-8133713 [macosx] Accessible JTables always reported as empty
- Resolved
- relates to
-
JDK-8145211 [macosx] JTable, VoiceOver has no access
- Closed