wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes How to Add the Text field to the TextArea or TextPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to Add the Text field to the TextArea or TextPane" Watch "How to Add the Text field to the TextArea or TextPane" New topic

How to Add the Text field to the TextArea or TextPane

ch patel

Joined: Apr 07, 2009
Posts: 1
I want to add the Text field to the TextArea or TextPane, is it possible ?
My aim is i want to read the text fiel in textpane/textarea and want to display the text field near the values which are read from the text file, so i need to display textfield as well as valeus of text file.

I think it may be not possible due to that textarea or textpane is not a contenar.

suggest if any solution is their.

Chintan Patel
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41155
What do you mean by "to add the Text field to the TextArea"? You can put both elements next to each other in a layout. Are you somehow imagining putting them on top of one another? (I didn't get the explanation of why you want to do this).

Ping & DNS - my free Android networking tools app
selvarajan anand

Joined: Jul 29, 2004
Posts: 4
yeah. you can add a textfield to the textarea. it is possible. But, the textfield overlaps over the text of the textarea. try if you can make it opaque and adjusting the layout( if possible).
Darryl Burke

Joined: May 03, 2008
Posts: 4523

Just another cross poster.

luck, db
There are no new questions, but there may be new answers.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10172

Please check your private messages for an important administrative matter.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Darryl's link for the sun forums cross-post should have been

It is sorta covered in the JavaRanch Style Guide.
subject: How to Add the Text field to the TextArea or TextPane
Similar Threads
JTextPane.setPage() is so slow when the target page is huge
FocusListener problem
Reading HTML using JAVA
Big text file into textarea
File save and display in Swing