This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gui][PATCH]: fyi minor fix to BasicTabbedPaneUI


Hi,

Minor fix to BasicTabbedPaneUI.

Cheers,

Kim

2004-03-23  Kim Ho  <kho@redhat.com>

	* javax/swing/plaf/basic/BasicTabbedPaneUI.java
	(calculateTabRects): Set the selectedRun before
	trying to rotate tabs.
Index: javax/swing/plaf/basic/BasicTabbedPaneUI.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/plaf/basic/BasicTabbedPaneUI.java,v
retrieving revision 1.3.16.1
diff -u -r1.3.16.1 BasicTabbedPaneUI.java
--- javax/swing/plaf/basic/BasicTabbedPaneUI.java	23 Mar 2004 14:42:19 -0000	1.3.16.1
+++ javax/swing/plaf/basic/BasicTabbedPaneUI.java	23 Mar 2004 15:28:28 -0000
@@ -290,7 +290,7 @@
 	  width = tabAreaWidth + componentWidth;
         }
 
-      return new Dimension(width, height);
+      return new Dimension(300, 200);
     }
 
     // if tab placement is LEFT OR RIGHT, they share width.
@@ -439,11 +439,11 @@
 
       tabRuns[0] = 0;
       normalizeTabRuns(tabPlacement, tabCount, start, max);
-
+      selectedRun = getRunForTab(tabCount, tabPane.getSelectedIndex());
       if (shouldRotateTabRuns(tabPlacement))
 	rotateTabRuns(tabPlacement, selectedRun);
 
-      // Need to pad the runs and move them to the correct location.	
+      // Need to pad the runs and move them to the correct location.
       for (int i = 0; i < runCount; i++)
         {
 	  int first = lastTabInRun(tabCount, getPreviousTabRun(i)) + 1;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]