Java
Programming and Technical
In a container there are 5
components. I want to display all the component names,
how will you do that?
Read Solution (Total 1)
-
- Component components[]=container.getComponents();
for (int i = 0; i < 5; i++) {
System.out.println(components[i].getClass().getName());
System.out.println(components[i].getName());
} - 9 years agoHelpfull: Yes(0) No(0)
Java Other Question