aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes TextField tf = new TextField( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "TextField tf = new TextField("this is for",40);" Watch "TextField tf = new TextField("this is for",40);" New topic
Author

TextField tf = new TextField("this is for",40);

sarim raza
Ranch Hand

Joined: Nov 02, 2000
Posts: 232
what happens as a result ?
does the number of viewable characters depend on what kind of font we use ?
suppose font is fixed, will we then see 40 characters ?
If it is not fixed, is it impossible to see 40 characters?
if the string above was made larger to have more than 40 characters, would it be viewable or we would have to scroll using arrow keys to see it ?
thanks
umang bhartia
Ranch Hand

Joined: Sep 29, 2000
Posts: 60
Yes sarim u r right, the number of characters visible in a text field depends on the font u r using. If u provide a text field for 40 characters then its not possible to view 40 characters even if u change the font. The number of columns is a measure of the size of the text line according to the particular font used for rendering the text. However for a fixed pitch fonts, the number of columns is equal to the number of characters in the text line. Hope i m clear
 
jQuery in Action, 2nd edition
 
subject: TextField tf = new TextField("this is for",40);