• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is there a swing component or an awt component for an IPAddress Field

 
Meghna ks
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Is there a swing component or an awt component for an IPAddress format to be accepted. If so, please let me know. Right now, I'm able to format using a JMaskedTextField, but I need to restrict the numbers entered into the IPADdress to 255 i.e 255.255.255.255. How do I do this ?!!
Thanks
Meghna
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could put an event listener on the field and when it loses focus you edit the contents of the field and if it is incorrect put the focus back on that field with an error message.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!