dcsimg
Neet help with rather stupid issue
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aleksey_Biryukov
Posted On:   Wednesday, August 6, 2003 09:26 PM

I am trying to write a Java based Chat room. I am half way through, but I have encounterd a rather stupid problem and can not figure out how to solve it. I really need help. The problem is: I am Using JTextArea to display all the messages in general chat room, but instead of already typed text going up and new messages staying on the last line, somehow the messages keep going below the boundaries of the JText area. I have attached a JScrollPane to JTextArea, so I can see all the messages, but I have to scroll down for it. Ho I can change the orientation of the JTextArea or JScrollPane to make it scroll in opposite direction. i just spend about 2 hours searching Java API and found nothing useful. HELP email me at voit   More>>

I am trying to write a Java based Chat room. I am half way through, but I have encounterd a rather stupid problem and can not figure out how to solve it. I really need help. The problem is:


I am Using JTextArea to display all the messages in general chat room, but instead of already typed text going up and new messages staying on the last line, somehow the messages keep going below the boundaries of the JText area. I have attached a JScrollPane to JTextArea, so I can see all the messages, but I have to scroll down for it. Ho I can change the orientation of the JTextArea or JScrollPane to make it scroll in opposite direction. i just spend about 2 hours searching Java API and found nothing useful.



HELP

email me at voitel@hotmail.com

   <<Less

Re: Neet help with rather stupid issue

Posted By:   Bahman_Barzideh  
Posted On:   Thursday, August 7, 2003 04:34 AM

You can bring a particular line of the text into view by calling the JTextArea.scrollRectToVisible () method (pass it a rectangle that falls within the desired line).
About | Sitemap | Contact