Hi
Does anyone know how to give add an ActionListener to an array? If I were to add it to a a button I go...
JButton button = new JButton;
c = getContentPane();
c.add(button)
button.addActionListener(Listener);
But... how do I add an array ... buttons[]... to the above.
When I use
c.add(buttons) or
c.add(buttons[])
it does not work... and when I use
buttons[].addActionListener it does not work.
Any help would be great,
Thanks,
HappyB
Does anyone know how to give add an ActionListener to an array? If I were to add it to a a button I go...
JButton button = new JButton;
c = getContentPane();
c.add(button)
button.addActionListener(Listener);
But... how do I add an array ... buttons[]... to the above.
When I use
c.add(buttons) or
c.add(buttons[])
it does not work... and when I use
buttons[].addActionListener it does not work.
Any help would be great,
Thanks,
HappyB