Computer Science Canada Moving a JTextArea to the bottom of a JFrame |
Author: | S_Grimm [ Mon Nov 17, 2008 11:45 am ] |
Post subject: | Moving a JTextArea to the bottom of a JFrame |
What i need to do is move a JTextArea to the bottom of the JFrame. When you run the code the input box is on the side. I need to put it on the bottom. Compile ChatWindow first, then compile and run ChatClient. Any help is appriciated. Thanks in Advance A\V |
Author: | Vermette [ Mon Nov 17, 2008 11:51 am ] |
Post subject: | RE:Moving a JTextArea to the bottom of a JFrame |
you need to arrange your components using the appropriate Layout Manager. I took a quick peek at your code and it looks like you were using the Border layout, which works by snapping components to the cardinal points in the order you specify. If you don't specify a manager I think the default is FlowLayout. edit: uhh ignore my comment about cardinal points, that usage got deprecated in 1.4. You can tell I didn't keep up to date on Swing http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html |