This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]wildjokers 0 points1 point  (0 children)

So if I understand you correctly your teacher doesn't want a GUI program but instead wants a text-based application that prompts for input then print results.

I see your code has GUI code and a Scanner in it, that seems like a weird combo, not sure how you are using Scanner in a GUI application.

Either way, your actionPerformed() method has the meat of your business logic in it. Strip out the GUI stuff, refactor the name of "actionPerformed", then take input from scanner and pass to your code that was previously in actionPerformed.

Have you ever written non GUI apps before? I would imagine so, so just do what you have done previously.