There is an array of buttons to which a handler with complex logic is registered.
for(int i = 0; i < 10; i++){ for(int j = 0; j < 10; j++){ MyButton b = new MyButton(); b.setBackground(Color.white); b.setLocation(i, j); b.addActionListener(CellListener.getInstance()); b.setBounds(40+j*20, 40+i*20, 20, 20); this.add(b); arrayCell.add(b); } } How can you force events from these buttons from another place of the program to test the logic of the attached listener?
doClick()- Yuriy SPb ♦