• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I limit my JavaFX textfield max value to 255?

 
Eddie Cross
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's what I have:



The above code limits the user to input 3 characters and only numbers [0-9]. How can I set maximum value of the textfield to just 255. Any number input that exceeds 255 should be replaced by 255.
Thanks in advance.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!