2011-03-21 1 views

답변

3

당신은 이런 식으로 뭔가를 시도 할 수 있습니다 :

public class MyRichTextField extends RichTextField { 

    public MyRichTextField() { 
     super(); 
    } 

    public void setText(String text) { 
     try { 
      int x = Integer.parseInt(text); 
      super.setText("" + x); 
     } catch (NumberFormatException e) { 
      // the text is not a number 
      super.setText(""); 
     } 
    } 
} 
+0

아래 코드를 사용하여 해결했습니다. –