I've programmed a relay chat system in Java. Just having two GUI-related problems with the chat client itself.
Problem #1 : I can't get the chat windows to scroll as new text appears in them. The scroll bar does appear when it needs to, but it remains at the top of the box (but grows smaller as more text is appended) ...so the newly appended text is hidden unless you scroll the scrollbar further down yourself.
This is what I'm doing:
I have a JTextArea for the text, then I have a JScrollPane to which I've added the JTextArea.
Then I've added the JScrollPane to (the contentPane of) the JFrame.
I have the vertical-scroll-bar policy of the JScrollPane set to ALWAYS.
I've also set the viewport of the JScrollPane to my JTextArea.
How do I get the scrollbar scrolling to keep up with text being added to the chat window?
I'm using JFrames for the chat client windows. I want to prevent the chat client user from re-sizing the windows. How do I do this??