Skip to content
Advertisement

Tag: abstract-action

Switch Case In ActionPerformed?

Ive gone through some stack overflow questions and found this similar question. From what I understand using a switch statement in an actionPerformed method for this context will not work and an if-else statement is required. Is there a more efficient way to do this without having repetitive code? I’ve heard I could use Abstract Action to give multiple buttons

Advertisement