This site requires JavaScript, please enable it in your browser!
Greenfoot back
ironphoenix20
ironphoenix20 wrote ...

2015/12/17

Output Box

ironphoenix20 ironphoenix20

2015/12/17

#
How do I make a message box appear instantly in my world without having to click the greenfoot icon in the taskbar to see the output window?
fejfo fejfo

2015/12/17

#
There are multipel options you could use the Label class (imported) or use the show text function or use System.setOut(OutputStream) and have an Pritner class extend OutputStream with show the text
ironphoenix20 ironphoenix20

2015/12/18

#
Can you explain with code how to do the System.setOut(OutputStream)?
fejfo fejfo

2015/12/19

#
Thats really complex : I don't understand it fully so here are the docs https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#setOut(java.io.PrintStream) https://docs.oracle.com/javase/7/docs/api/java/io/PrintStream.html https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html
danpost danpost

2015/12/19

#
What is the nature of the output? Are you referring to the terminal window that error and 'System.out.print' statements place their output? If so, that window is mainly used for debugging your project. Output, as part of the program itself, should be directed to the user in another way -- using a JDialog or an Actor object are the most common ways.
You need to login to post a reply.