When I try to remove components from the 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 weren’t doing anything, but resets it as if it was overloaded. This does not give any errors. But when I paste con.getComponent(i).setVisible(false);into the code, it works, but I want to DELETE the components. Halp?
source
share