• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Text field

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
Please give me a solution, if any, regarding text field size. According to the specs i have to make a text field for user input. Usually at the beginning it shows up a small rectangle and become larger as text become larger( if max char supports). I need a big( 5/6 lines) rectangle at the starting. How could i make this???

Regards
Debojit
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


You can simply give the size on textField constuctor

TextField txt=new TextField("label","text",50,TextField.ANY);
keep changing that size until it satisfies ur needs.
 
Debojit Nag
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
Yeah, thats true, but not in my case. This will show up the text field with by default height and then goes on increasing as no. of line increased.But I need bigger height at the beginning.

Debojit
 
sailesh sirari
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


Simply use

txt.setPreferredSize(-1,200);
where txt is Textbox initialised first!
 
reply
    Bookmark Topic Watch Topic
  • New Topic