I have array of 10 JFrames instanced and I want to kill 3 or 5 or n if them,but not all!!!
how should I do it?
and where? in constructor or in main...?
public class KlasaMrdanje extends JFrame
{
public int kontrola1;
public KlasaMrdanje(int kontrola) throws Exception //KAKO DOBRO SA KONSTRUKTOR ISPALO HEHE
{
//int kontrola=3;
//double[] nizd = new double [nd];
StoProzora[] a=new StoProzora[50]; //kreiras dinamicki vektor
//niz[1].setVisible(true);
// bam,samo da ih izbaci
for (int i=0;i<10;i++)
{
a[i] = new StoProzora();//kreiras objekte vektora
a[i].setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//for(int j=0;j<(int)Math.random()*100;j++)
//Thread.sleep(5);
//a[i].setVisible(true);
a[i].setLocation((int)(Math.random()* 1000),(int)(Math.random()*1000));
a[i].setVisible(true);
}