Results 1 to 2 of 2
Thread: Making JScrollPane not stretch
- 03-17-2011, 06:10 PM #1
Member
- Join Date
- Mar 2011
- Posts
- 12
- Rep Power
- 0
Making JScrollPane not stretch
Hey there,
I have a JScrollPane inside which is a JTextArea. This area is for messages to pop up on and such. This works fine, but for some reason it seems to stretch across the entirety of the JPanel is has been added to, even when I a) set the width of the scrollpane to less using SetPreferredSize and/or use the same method to set the width of the JPanel it is sitting in to less (I do use pack() so that these methods are actually used). All I wish to do is set the width of the text area so that it sits nicely in the middle of the gui rather than stretching to the edges, which looks bad and isn't needed.
Thanks.
- 03-17-2011, 06:51 PM #2
Similar Threads
-
Need Help With JScrollPane Please
By MemorableSmile in forum New To JavaReplies: 4Last Post: 01-31-2011, 02:39 AM -
JScrollPane
By hiddenpremise in forum AWT / SwingReplies: 2Last Post: 12-25-2010, 05:15 AM -
JScrollPane
By UJJAL DHAR in forum New To JavaReplies: 12Last Post: 08-17-2010, 06:47 PM -
jscrollpane
By kaemonsaionji in forum New To JavaReplies: 3Last Post: 02-25-2009, 08:39 AM -
help with JScrollPane
By tommy in forum AWT / SwingReplies: 1Last Post: 08-06-2007, 07:58 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks