CVSROOT: /cvsroot/classpath Module name: classpath Changes by: Lillian Angel <langel> 06/06/12 16:08:28
Modified files: . : ChangeLog javax/swing/plaf/basic: BasicTabbedPaneUI.java Log message: 2006-06-12 Lillian Angel <[EMAIL PROTECTED]> * javax/swing/plaf/basic/BasicTabbedPaneUI.java (layoutContainer): Added check to prevent exception. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.7781&r2=1.7782 http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java?cvsroot=classpath&r1=1.46&r2=1.47 Patches: Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7781 retrieving revision 1.7782 diff -u -b -r1.7781 -r1.7782 --- ChangeLog 12 Jun 2006 14:36:06 -0000 1.7781 +++ ChangeLog 12 Jun 2006 16:08:26 -0000 1.7782 @@ -1,3 +1,8 @@ +2006-06-12 Lillian Angel <[EMAIL PROTECTED]> + + * javax/swing/plaf/basic/BasicTabbedPaneUI.java + (layoutContainer): Added check to prevent exception. + 2006-06-12 Tom Tromey <[EMAIL PROTECTED]> * java/lang/Thread.java (uncaughtException): Javadoc fix. Index: javax/swing/plaf/basic/BasicTabbedPaneUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java,v retrieving revision 1.46 retrieving revision 1.47 diff -u -b -r1.46 -r1.47 --- javax/swing/plaf/basic/BasicTabbedPaneUI.java 9 Jun 2006 23:34:34 -0000 1.46 +++ javax/swing/plaf/basic/BasicTabbedPaneUI.java 12 Jun 2006 16:08:27 -0000 1.47 @@ -532,7 +532,10 @@ Insets insets = tabPane.getInsets(); int selectedIndex = tabPane.getSelectedIndex(); - Component selectedComponent = tabPane.getComponentAt(selectedIndex); + + Component selectedComponent = null; + if (selectedIndex >= 0) + tabPane.getComponentAt(selectedIndex); // The RI doesn't seem to change the component if the new selected // component == null. This is probably so that applications can add // one single component for every tab.