When I try to remove Components from a Container, I use this code.
private static void clear(){
for (int i = con.getComponentCount() - 1; i >= 1; i--){
con.remove(i);
}
}
When I call this function, the function acts as if it has done nothing, but crashes it as if its overloading. It gives no error. But when I put con.getComponent(i).setVisible(false);
in the code it works, but I want to REMOVE the components. Halp?