I have this code to get all the elements I need and do some processing. The problem is I need to specify every panel I have to get the elements inside it.
for (Component c : panCrawling.getComponents()) {
//processing
}
for (Component c : panFile.getComponents()) {
//processing
}
for (Component c : panThread.getComponents()) {
//processing
}
for (Component c : panLog.getComponents()) {
//processing
}
//continue to all panels
I want to do something like this and get all the elements without need specefy all the panels names. How I do this. The code below don't get all the elements.
for (Component c : this.getComponents()) {
//processing
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…