Hi,
I am working on an exercise for class which, work and everything but I am having trouble figuring out how to have my classes setup to be called from multli locations. I know you can use:
java Code:
private JButton Play = new JButton(); PlayGame gameHandler Play = new JButton(); Play.setText("Play"); Play.setVisible(true); Play.addActionListener(gameHandler); class PlayGame implements ActionListener { public void actionPerformed(ActionEvent e) { for (int i = 0; i < 9; i++) { btnKeypad[i].setText(" "); btnKeypad[i].setEnabled(true); } } }
to call a function from a button. However, how would I call the function from within another function?
Thanks,
Nightwalker




Reply With Quote