1

i have created a input form using Netbeans IDE containing a button and a Textarea. if i click a button it should call output.java program where the main part of execution resides and it should display the output in the TextArea created in the input.java. Am not getting the output in TextArea..the reason is my output.java program cudnt identify the textarea. but am getting output in window output console.please help me overcome this problem.thanks in advance

2
  • 2
    Is that really the most descriptive title you could come up with? Commented Apr 29, 2010 at 8:58
  • How do you "call output.java program"? Invoking its main()? Process exec? Can you modify output.java to use an arbitrary PrintStream or is it hardcoded to System.out? Give us more details. Commented Apr 29, 2010 at 9:06

2 Answers 2

2

That's because you're doing it all wrong. The textarea is in a different process so you need to capture the output of the other program yourself.

Sign up to request clarification or add additional context in comments.

Comments

1

Try passing a reference of the JTextarea in question to the output.java as a Constructor or method argument.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.