JLabel[] x=new JLabel[10];
int i=0;
for(component comps : a.getComponent_list())
{
x[i]=comps.getType().getImg();
x[i].setBounds(comps.getPosition().x, comps.getPosition().y, comps.getType().getWidth(), comps.getType().getHeight());
System.out.println("Coming Here,"+comps.getId()+","+comps.getPosition().x);
this.add(x[i]);
i++;
}
repaint();
I want to have all the labels in their position. after this function.
but only the last added label is shown. What can I do?