Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

"scroll bars problem"

After typing more in one text box scroll bars are not appearing, i wrote the necessary code to appear the scroll bars.Can u tell me wt might be the problem?


thanks in advance
charakin
0
charakin
Asked:
charakin
  • 3
1 Solution
 
Mayank SAssociate Director - Product EngineeringCommented:
I'm assuming that you're using TextArea in a Frame. If not, then you can just modify the code a bit to make it work.

TextArea mytext = new TextArea ( "", 200, 200, TextArea.SCROLLBARS_VERTICAL_ONLY ) ;
mytext.setBounds ( 100, 100, 200, 200 ) ;
add ( mytext ) ;

This will draw a text-area of size 200 X 200 pixels with the top-left corner at (100, 100) and it will only let a vertical scrollbar be there. It will be initially deactivated but when you type text which exceeds the capacity of the text-area, it will be actiuvated automatically. Also, you can use TextArea.SCROLLBARS_BOTH or TextArea.SCROLLBARS_HORIZONTAL_ONLY as per your need.

Mayank.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
How about rating it now?
0
 
CleanupPingCommented:
charakin:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Recommendation: Accept mayankeagle's comment as answer :-)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now