• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to increase the size of the text field and change its position ?  RSS feed

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my text box is very small in output , even though i have manually set the text bounds by giving the pixels and all , but still it does not changing any size of it ..please tell me whats wrong ?

 
Andrey Kozhanov
Ranch Hand
Posts: 79
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use another JTextField constructor - JTextField(String text), where text contains initial text field string, or JTextField(int columns).
 
Rob Spoor
Sheriff
Posts: 20895
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct. The call to setBounds is useless as the layout manager will resize it anyway. Naved, you should read this.

I'll move this thread to our GUI forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!