Last active
August 29, 2015 14:04
-
-
Save justinParton/0e085b50ddd71819874a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class PageActionListener implements ActionListener { | |
private int page; | |
public PageActionListener(int page) { | |
this.page = page; | |
} | |
public void actionPerformed(ActionEvent e) { | |
setPage(page); | |
} | |
} | |
... | |
for(int i = 0; i < 10; i++){ | |
button = new JButton(buttons[i]); | |
button.addActionListener(new PageActionListener(i)); | |
menu.add(button); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.eclipse.org/windowbuilder/