OSDN Git Service

2006-08-14 Mark Wielaard <mark@klomp.org>
[pf3gnuchains/gcc-fork.git] / libjava / classpath / javax / swing / JSplitPane.java
index 2747686..5b77f51 100644 (file)
@@ -708,7 +708,8 @@ public class JSplitPane extends JComponent implements Accessible
       throw new IllegalArgumentException
         ("proportion has to be between 0 and 1.");
 
-    int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight();
+    int max = ((orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight())
+              - getDividerSize();
     setDividerLocation((int) (proportionalLocation * max));
   }