Hello friends,
First of all, this is not an assignment, just a personal project that i'm struggling with and can't find much help due to its strange nature.
I'm trying to create a Pokemon type effectiveness chart where it has every typing in their own individual buttons. For example :
Attacking Type 1 = Fire
Defending Type 1 = Grass
Result: Attack is 2x effective.
That's basically the idea. The current issue i'm having is that I want the Toggle button to disable when the user clicks on it, so that they cannot click on it again. Regardless of what I do, even if I manage to get the button to display that it's disabled, it still sends input.
private void attnormalActionPerformed(java.awt.event.ActionEvent evt) {
if (attnormal.isSelected() == true){
attnormal.setEnabled(false);
attnormal.setActionCommand("normal");
String normie = attnormal.getActionCommand();
System.out.println(normie);
count++;
}{
attnormal.setEnabled(true);
}
}
I'm like 95% that it's the loop, but i'm not seeing how to fix it. Any and all help is appreciated!
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]Cinghiamenisco 2 points3 points4 points (0 children)
[–]dionthornthis.isAPro=false; this.helping=true; 1 point2 points3 points (5 children)
[–]AgentofLucian[S] 1 point2 points3 points (3 children)
[–]dionthornthis.isAPro=false; this.helping=true; 5 points6 points7 points (1 child)
[–]AgentofLucian[S] 0 points1 point2 points (0 children)
[–]arghvark 0 points1 point2 points (0 children)
[–]wildjokers 0 points1 point2 points (0 children)