Hi All,
I just want to set the text into textarea start from bottom to top.
But i am not able to do it.what should i supposed to do or is there any other component of having the propert to set the text from bottom to top.
waiting for reply.......
Sandeepesh shah
Greenhorn
Joined: Feb 11, 2010
Posts: 10
posted
0
sandeepshah shah wrote:Hi All,
I just want to set the text into textarea start from bottom to top.
But i am not able to do it.what should i supposed to do or is there any other component of having the propert to set the text from bottom to top.
You cannot do that with the default jTextArea. You will have to extend the Class JTextArea. If you mean extracting the contents of a JTextArea, you can use a stack. Please you have to give more details.
Yes, Raphael is right. You should explain what it means to "set text into a JTextArea from bottom to top".
Sandeepesh shah
Greenhorn
Joined: Feb 11, 2010
Posts: 10
posted
0
Ok I explain in more detailed what i want to do.
I have a JTextarea of setbounds width=200 and height =50.in which suppose i can write 5 line ok.
but my text generate dynamically it is not sure whether it will fit into 2 line 3 line or more.......
if suppose my dynamic text feet till 3 line and i have the height of Jtextarea is 50 which can hold 5number of line so the last
2 line will remain blank ok/
But i want to set my dynamic text from bottom to top.means all my three line should feet from line number 5,4,3
and my JTextarea will display the above two line blank and the last three line should hold my dynamic text......
for more clearity please check the attachment........
At run time, figure out how many lines of text you got. Based on that, prepend those many \n to your text and then set it to the text area. You will need to work out the linewrap problem though.