Is there a println() equivalent for a JTextArea? Or perhaps a method that adds specified text to the current caret location?
Printable View
Is there a println() equivalent for a JTextArea? Or perhaps a method that adds specified text to the current caret location?
1. Your title and description of problem doesn't match.
2. What do you need to do? If you want to print the value of any component. Get it value by using .getText() function.
Hi,
I think you want to type something int the text field or area
if so you can use the class's contractor
Then you write the same for area but you write JTextArea instead of JTextFieldPHP Code:JTextField name = new JTextField("Everythink you want");
if not search at Java Platform SE 6 and I am pretty sure you will find what you want it has all Java packages classes and methods (at least the published by Oracle) there would be the method you want.
I hope i helped you if not post you question with a more understandable way
Ps: Sorry for my grammatical or syntax mistakes but I am from greece
JTextArea does indeed have the wanted functionality. Check the API and look for "insert" and "getCaretPosition".
Sent from my GT-I9000 using Tapatalk
OOPS. didn't see the typo, *edited*