问题
I have a Java program which is executed through the basic command line interface. I am wondering about put it in a window JFrame. Is it possible? How can I do?
Thank you.
回答1:
If you want command line inside a jFrame I think it is not a good idea. If the JFrame is started that means the program is already started. You have to start the program using command line or running a executable jar file.So there is no meaning in what you are going to do.
If you want to see your output inside a JFrame rather than in the command line, that can be done. You can look here for details of swing programmimng
来源:https://stackoverflow.com/questions/8200707/how-to-launch-command-line-java-code-inside-a-jframe