Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTextField

 
Eric Wilson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i use/override the method getPreferredSize for a JTextField
 
Joe Ess
Bartender
Pie
Posts: 9264
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to set the preferred size, every get method usually has a corresponding set (i.e. setPreferredSize(java.awt.Dimension)). If you want to override getPreferredSize, you'd have write your own class to extend JTextField.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic