|
Java™ by example!
|
|
|
How do I create a formatted textfield that only accepts IP addresses?
 JDK1.4 introduced the JFormattedTextfield with which you can set a mask on a text field. This example not only shows you how to set the mask (eg. 255.255.xxx.xxx), but also how to use an InputVerifier to check whether the inputted digits lie in the range [0-255]. Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|