A textbox class only accept integers in Java

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-03-09T02:28:37Z Indexed on 2010/03/09 2:36 UTC
Read the original article Hit count: 259

Filed under:
|
|
|

I just want to do a textbox class onl accepts integers..

I have done something, but i think it's not enough. Can anyone help me, please? Thanks...

import java.awt.TextField
public class textbox extends TextField{
    private int value;

    public textbox(){
        super();

    }

    public textbox(int value){
        setDeger(value);
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {

        this.value = value;
    }
}

© Stack Overflow or respective owner

Related posts about java

Related posts about textbox