• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to lock\disable JTextField?

 
Shawn Rieger
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I lock a JTextField so that it wont accept user input and at the same time it can't be grayed out if disabled. If this is not possible I can use a JLabel but I need a border and am not sure how do this. I'm using gridbaglayout. Any ideas?
 
Stephen Boston
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this.
 
Shawn Rieger
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ahh, thanks!
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!