|
Re: JScroolPane in a JTextArea [message #137304 is a reply to message #137059] |
Wed, 18 April 2007 14:22 |
Eclipse User |
|
|
|
Originally posted by: briankimerer.yahoo.com
> Anyone knows how to put a scrool pane in a textarea
> using the VE?? and how
> do i set for it rool automatic when the text get at
> the end of the
> textarea??
> thank!
>
I believe that you would have to put the TextArea into the ScrollPane to make that work.
Brian
|
|
|
|
Re: JScroolPane in a JTextArea [message #137449 is a reply to message #137059] |
Sat, 28 April 2007 17:55 |
Eclipse User |
|
|
|
Originally posted by: marcelabx.gmail.com
You have to write the code
Example:
JTextArea txarea= new JTextArea();
JScrollPane pScroll = new JScrollPane(txarea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
then you add the jscrollpane at the panel
p1 = new JPanel(new BorderLayout());
p1.add(pScroll, BorderLayout.CENTER);
|
|
|
Re: JScroolPane in a JTextArea [message #615196 is a reply to message #137059] |
Wed, 18 April 2007 14:22 |
Eclipse User |
|
|
|
Originally posted by: briankimerer.yahoo.com
> Anyone knows how to put a scrool pane in a textarea
> using the VE?? and how
> do i set for it rool automatic when the text get at
> the end of the
> textarea??
> thank!
>
I believe that you would have to put the TextArea into the ScrollPane to make that work.
Brian
|
|
|
|
Re: JScroolPane in a JTextArea [message #615209 is a reply to message #137059] |
Sat, 28 April 2007 17:55 |
Eclipse User |
|
|
|
Originally posted by: marcelabx.gmail.com
You have to write the code
Example:
JTextArea txarea= new JTextArea();
JScrollPane pScroll = new JScrollPane(txarea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
then you add the jscrollpane at the panel
p1 = new JPanel(new BorderLayout());
p1.add(pScroll, BorderLayout.CENTER);
|
|
|
Powered by
FUDForum. Page generated in 0.02316 seconds