Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void actionPerformed(ActionEvent e)
- {
- if(placementLimit < 5){
- //placementlimit is limit to buttons clicked
- JButton clickedButton = (JButton)e.getSource();
- clickedButton.setBackground(Color.RED);
- /* something like: int pos = clickedButton.getGridPos
- * arrayplacedpositions.add(pos);
- */
- placementLimit++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement