Solved

Console window to swing

Posted on 2001-08-30
7
220 Views
Last Modified: 2013-12-29
Who answer this guestion well obtain (A)

How I can move the text(error messages,parameter entering prompt
for console window program) happen during the compilation or
run of java program to JTextarea or other swing component
from the msdos window and how i can enteract with console program
parameter entering prompt from the swing component ?
0
Comment
Question by:FAKHREELDIN
  • 2
  • 2
  • 2
  • +1
7 Comments
 

Author Comment

by:FAKHREELDIN
ID: 6441250
this qestion need experts
0
 

Author Comment

by:FAKHREELDIN
ID: 6441270
Java is best
0
 
LVL 9

Expert Comment

by:doronb
ID: 6441673
Hi,


I think the best way is to try to set the System.out and System.err output streams to output streams you've created and every time there's some output to display you can use RMI to send the output from the stream to a Swing client program that registered with your program as a listener to the output updates..


Doron
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 3

Accepted Solution

by:
daitt earned 200 total points
ID: 6443092
You can use Runtime.getRuntime().exec(...) to run your java application (or to compile it). You then get the Process object returned by exec(). This object provide you an InputStream and OutputStream that allow you interact with the application. To display the output of the application, just read it from the InputStream and display. To send input to the application, just write it to the OuputStream.
Regards,
Dai
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6872986
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20103897.html
http://www.experts-exchange.com/questions/Q.20172723.html
http://www.experts-exchange.com/questions/Q.20176396.html
http://www.experts-exchange.com/questions/Q.20182574.html
http://www.experts-exchange.com/questions/Q.20187110.html
http://www.experts-exchange.com/questions/Q.20246317.html
http://www.experts-exchange.com/questions/Q.20246635.html
http://www.experts-exchange.com/questions/Q.20267823.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20184981.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 
LVL 3

Expert Comment

by:daitt
ID: 6873825
I think I answered this question.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6897992
Thank you, finalized by EE Moderator.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now