0

Is there a possible way to attach the console to a GUI so that the user will be able to enter commands into the console from the GUI?

1 Answer 1

1

As long as the program is launched from the console, it can read and write from/to the console. There's nothing that makes a Java program "GUI" or "Console" except for the code.

If you want to always have a console regardless of how the program is launched, you could just code a frame to behave as one.

Sign up to request clarification or add additional context in comments.

2 Comments

I made changes to my question. I want to enter the console command inside the GUI.
for example. the program prompts the user to enter in two values into the console. the program then prints out the two values added together and prompts the user if s/he wants to do it again. i want to do all of this within the gui.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.