Home arrow static arrow Java Programming [Archive] - Change console
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Change console
This topic has 8 replies on 1 page.

Posts:297
Registered: 4/10/04
Change console  
Aug 1, 2004 8:48 AM



 
I made a console-based program ( System.out, System.in ) how can I change the console? ( most users do not enable the console in the prefs )
 

Posts:8,813
Registered: 10/4/00
Re: Change console  
Aug 1, 2004 8:58 AM (reply 1 of 8)



 
What in the world do you mean by 'change the console'?
 

Posts:297
Registered: 4/10/04
Re: Change console  
Aug 1, 2004 1:02 PM (reply 2 of 8)



 
I mean, make it appear in a Frame whatever way
 

Posts:297
Registered: 4/10/04
Re: Change console  
Aug 1, 2004 1:03 PM (reply 3 of 8)



 
Like, System.out.println would print to a TextArea ( that I can do but not with System.in )
 

Posts:447
Registered: 3/8/01
Re: Change console  
Aug 1, 2004 1:55 PM (reply 4 of 8)



 
Don't use System.out or System.in then. Rather, make your own class which has some method that you can call to write to the text area. System.out and System.in are defined to be the standard input/output to your program, which is something chosen for you by the operating system when it runs the program.
 

Posts:8,813
Registered: 10/4/00
Re: Change console  
Aug 1, 2004 2:08 PM (reply 5 of 8)



 
System.setOut()
 

Posts:2,821
Registered: 7/10/01
Re: Change console  
Aug 1, 2004 2:09 PM (reply 6 of 8)



 
You could reassign them to a Stream that channeled to a TextField, its not hard.
 

Posts:297
Registered: 4/10/04
Re: Change console  
Aug 2, 2004 7:10 AM (reply 7 of 8)



 
You could reassign them to a Stream that channeled to a TextField, its not hard.

I believe it's not hard but i'm not good either and can't understand what you mean :( how can i cannel a Stream to a component?
 

Posts:8,813
Registered: 10/4/00
Re: Change console  
Aug 2, 2004 8:10 AM (reply 8 of 8)



 
System.setOut()

Try !!! I found what looks overly simple here, but it should at least give you the idea.
http://forum.java.sun.com/thread.jsp?forum=54&thread=276875
 
This topic has 8 replies on 1 page.