How to display names of all components in a Container?



How to display names of all components in a Container?..

Answer / Amit Vikram Singh

To display names of all components in a container, you can use the getComponentNames() method provided by the Container class. Here's an example:nn```javanfor (String name : container.getComponentNames()) {ntSystem.out.println(name);n}n"```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the difference between overriding & overloading?

1 Answers  


What is 16 bits called?

1 Answers  


Explain the features of java?

1 Answers  


what are depricated methods ?

5 Answers   Satyam,


What are Brief Access Specifiers and Types of Access Specifiers?

1 Answers  


Does java allow default arguments?

1 Answers  


I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?

1 Answers  


can any body tell me? does advance java and j2ee both are same.

4 Answers   CTS, Infosys,


How to make class immutable

6 Answers  


What is a flag value?

1 Answers  


What is stringbuffer in java?

1 Answers  


What is independent and dependent variables in research?

1 Answers  


Categories