--- a/jdk/src/share/classes/javax/swing/JTable.java Fri Nov 02 16:50:23 2012 -0700
+++ b/jdk/src/share/classes/javax/swing/JTable.java Tue Nov 06 15:30:34 2012 +0400
@@ -781,15 +781,11 @@
scrollPane.getCorner(JScrollPane.UPPER_TRAILING_CORNER);
if (corner == null || corner instanceof UIResource){
corner = null;
- Object componentClass = UIManager.get(
- "Table.scrollPaneCornerComponent");
- if (componentClass instanceof Class){
- try {
- corner = (Component)
- ((Class)componentClass).newInstance();
- } catch (Exception e) {
- // just ignore and don't set corner
- }
+ try {
+ corner = (Component) UIManager.get(
+ "Table.scrollPaneCornerComponent");
+ } catch (Exception e) {
+ // just ignore and don't set corner
}
scrollPane.setCorner(JScrollPane.UPPER_TRAILING_CORNER,
corner);
--- a/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java Fri Nov 02 16:50:23 2012 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java Tue Nov 06 15:30:34 2012 +0400
@@ -159,7 +159,12 @@
// Store Table ScrollPane Corner Component
uiDefaults.put("Table.scrollPaneCornerComponent",
- TableScrollPaneCorner.class);
+ new UIDefaults.ActiveValue() {
+ @Override
+ public Object createValue(UIDefaults table) {
+ return new TableScrollPaneCorner();
+ }
+ });
// Setup the settings for ToolBarSeparator which is custom
// installed for Nimbus