How would I output console information to a GUI? I have a application that has a GUI up till I have the user move within directories similar to the CLI in linux. So how would I port the output and input from a console into a GUI. Would JPanel be the way to go or something else?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Technically, if you wanted to, you could use
JTextArea
to accomplish this. Instead of writing to the console what you'd normally write, such as some information telling the programmer that something was successful or unsuccessful (for troubleshooting of course), you can use JTextArea'sappend()
method to write what you would normally write on the console. Example:See the API for details
I know this was 2 years ago but, for any anyone else trying to accomplish the same thing, there is Java file that can add the functionality to input and output information to a GUI console and it can be found here.