# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: F:\Sources\MainTrunk\core\output2\src\org\netbeans\core\output2\ui # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: CloseButtonTabbedPane.java *** F:\Sources\MainTrunk\core\output2\src\org\netbeans\core\output2\ui\CloseButtonTabbedPane.java Base (1.9) --- F:\Sources\MainTrunk\core\output2\src\org\netbeans\core\output2\ui\CloseButtonTabbedPane.java Locally Modified (Based On 1.9) *************** *** 54,59 **** --- 54,67 ---- } private Component sel() { + // workaround for JDK bug 6420152 - please remove after JDK bug is fixed + int tabC = getTabCount(); + int selIndex = getSelectedIndex(); + if (selIndex != -1 && selIndex >= tabC) { + // JDK bug 6420152 - selection model and tab model not in sync + return tabC > 0 ? getComponentAt(tabC - 1) : this; + } + // end of workaround Component c = getSelectedComponent(); return c == null ? this : c; }