mercredi 4 mars 2015

Remove Item from Component[] in java



I need to know how i can remove an item or items from a Component[ ] array in java.I don't see any methods to do it fast.I have to use java Arrays to achive that?


For Example: I have a Jpanel with 30 same buttons and i do this:



Component[] comp = panel.getComponents();


How i can remove one or all the items from comp?


And something more if i set comp=null; it will clear all the items?




Aucun commentaire:

Enregistrer un commentaire