Hello! Everyone who has worked with Java at least once should have already seen codes intended for use in the console, such as the println()
method, located in System.out
.
I wonder if there is any terminal emulator for Java Swing. Just out of curiosity! For example: I have a Swing window, and inside it I need a component that "runs" instructions for the terminal (console). Here the pad:
Thread.sleep(1000);
System.out.println("Preparando-se para explodir...");
Thread.sleep(1000);
System.out.println("3");
Thread.sleep(1000);
System.out.println("2");
Thread.sleep(1000);
System.out.println("1");
Thread.sleep(1000);
System.out.println("KABUUUUUUUUUUUUUUM!!!!");
Thread.sleep(1000);
If you have not understood, think of those program installers (the famous Next, next, finish). In them there is a component that shows you the progress of the installation (creation of folders, configurations, etc.). This would be System.out.println()
.
So, could you help me?