Java NetBeans TEXDFIELD TYLKO

//Use in swing java key type and write this
char c = evt.getKeyChar();
        if(!Character.isDigit(c)){
            evt.consume();
        }
Mushy Manatee