public EcTextField(String text,int x, int y,int width,int height){
        //super(text);
        this.setText(text);
        setBounds(x,y,width,height);
        try {
            font = Font.createFont(Font.TRUETYPE_FONT, this.getClass().getResourceAsStream("/font/LucidaSansRegular.ttf"));
        } catch (FontFormatException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        this.setEditable(false);
        this.addKeyListener(new KeyListener() {
            @Override
            public void keyTyped(KeyEvent keyEvent) {
                char c = keyEvent.getKeyChar();
                EcTextField f = (EcTextField)keyEvent.getSource();
                if((c==8)&&(!f.getText().equals("")))f.setText(f.getText().substring(0, f.getText().length()-1));
                if((c>47)&&(c<58)) f.setText(f.getText()+c);
            }

            @Override
            public void keyPressed(KeyEvent keyEvent) {

            }

            @Override
            public void keyReleased(KeyEvent keyEvent) {

            }
        });
    }