This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using GridLayout/empty jTextFields appear too small

 
Krit Christoforou
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
When i insert an empty jTextField in my panel which has a GridLayout, it becomes too small.
I tried changing the minimum size of the jTextField by using qTxt10.setMinimumSize(defTxtSize);

but nothing happens, i get the same small jTextField.

Any ideas?
Thanks
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if you create your jtextfield like so:

textField = new JTextField(20);
 
Krit Christoforou
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works
Thanks a lot!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!