-
pls help ASAP with textArea and scrollPane
Hi i have coded a chatroom client that connects tot he server i am using a JtextArea with JscrollPane. The user inputs a sentence in the text field when they press enter it goes to the server and the server send it tot he client the client diplays it int he textarea ok the scroll bars are there but they dont scrol down for the latest entry of the user. Just think of any chat room powered by java on the net the user never has to scrold own for every new entry the chat is like auto scroll pls help , Thanks
Below is some of the code
text = new JTextArea(10,34); myPane.add(text);
sp = new JScrollPane(text);
sp.setPreferredSize(new Dimension (350,200));
myPane.add(sp, BorderLayout.CENTER);
botPanel = new JPanel();
Similar Threads
-
Replies: 2
Last Post: 02-08-2006, 08:45 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks