removing all children of a IFigure [message #241784] |
Fri, 14 March 2008 14:56 |
Eclipse User |
|
|
|
Originally posted by: alexjaquet.gmail.com
Hi,
I'm trying to remove the children of a figure for a specific needs and I
do it like this way
private void removeChildren() {
List<IFigure> children = getChildren();
for (int i = 0; i < children.size(); i++) {
IFigure child = children.get(i);
children.remove(child);
}
}
Unfortunatly I got the following exception while attempting to remove a
child : java.lang.UnsupportedOperationException
What can I do ?
Thanks
Alexandre
|
|
|
Re: removing all children of a IFigure [message #241789 is a reply to message #241784] |
Fri, 14 March 2008 15:05 |
Eclipse User |
|
|
|
Originally posted by: alexjaquet.gmail.com
Got it ... by simply call remove on this
private void removeChildren() {
List<IFigure> children = getChildren();
for (int i = 0; i < children.size(); i++) {
IFigure child = children.get(i);
this.remove(child);
}
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.03175 seconds