IntelliJ Java IDE
The moose likes Swing / AWT / SWT / JFace and the fly likes no scroll bars in JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "no scroll bars in JTextArea " Watch "no scroll bars in JTextArea " New topic
Author

no scroll bars in JTextArea

kumar mars
Ranch Hand

Joined: Jun 04, 2001
Posts: 34
hai
i have a web page with swing applet in it
the applet has a JTextArea which has to display the text.
Even if the size of the text is more than the size of text area the scroll bars are not coming up
should i set any paremeters to get the scroll bars
please help me
anticipating an early reply
bye


<BR>
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
You need to add a JScrollPane to your content pane, and add the JTextArea to that, so it is nested within the JScrollPane. Don't add the JTextArea directly to the applet's content pane.
Look up the JTextArea and JScrollPane javadoc, and follow the tutorials there!
Good luck.


Rob
SCJP 1.4
kumar mars
Ranch Hand

Joined: Jun 04, 2001
Posts: 34
Thank u Ross
 
 
subject: no scroll bars in JTextArea
 
Threads others viewed
Multiple lines on JLabel
How to give scrollbars to JTextArea when lines are greater than 3??
JtextField not showing up inside JscrollPane
automatic scrool to the Textarea
Reducing the thickness of scroll bars?
developer file tools