for (int i = 0; i < cont.getComponentCount(); i++) {
Component comp = cont.getComponent(i);
if (comp instanceof AbstractCommandButton) {
AbstractCommandButton acb = (AbstractCommandButton) comp;
acb.setText(resourceBundle.getString("Click.text"));
acb.addActionListener(new CounterActionListener());
}
if (comp instanceof Container) {
scan((Container) comp);
}
}