阅读背景:

查找Java JButton数组的索引

来源:互联网 

I am writing a Java program in which I have an array of buttons (not a calculator!) and I'm looking for an efficient way to know which JButton was clicked. From what I know of Java so far, the only way to do it is to have them all in the same ActionListener and then loop through looking for a match.I am writing a Java program in which I have an




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: