You should read the documentation (or at least the JavaDoc):
"public void add(Widget w): Adds a widget to a pane in the
HorizontalSplitPanel. The method will first attempt to add the widget
to the left pane. If a widget is already in that position, it will
attempt to add the widget to the right pane. If a widget is already in
that position, an exception will be thrown, as a HorizontalSplitPanel
can contain at most two widgets."
I guess on you second attempt at clicking then you are trying to "add"
a third widget, hence the exception. Try setLeftWidget(Widget w) or
setRightWidget(Widget w) instead.
//Adam
Syed Shahul skrev: