-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
1.2.0
-
sparc
-
solaris_2.5.1
Name: akC57697 Date: 10/13/97
The swing-0.5 com.sun.java.swing.JSplitPane.addImpl() incompatible with spec.
It does not define and does not throw TooManySplitPaneChildren exception.
The javadoc documentation says:
"
addImpl
protected void addImpl(Component comp,Object constraints,int index)
Will throw a TooManySplitPaneChildren exception if more than 2
^^^^^^^^^^^^^^^^^^^^^^
children already exist.
Overrides:
addImpl in class Container
"
-------------------Example-----------------------------------
import java.awt.*;
import com.sun.java.swing.*;
public class TestJSplitPane extends JSplitPane {
public void add(Component comp, Object constraints, int index) {
try {
super.addImpl(comp,constraints,index);
} catch (TooManySplitPaneChildren e) {
System.out.println("OKAY");
return;}
}
}
-------------------Output------------------------------------
javac TestJSplitPane.java
TestJSplitPane.java:8: Class TooManySplitPaneChildren not found in type declaration.
} catch (TooManySplitPaneChildren e) {
^
1 error
======================================================================