先看jdk:
Constructor Summary 
----------------------------------------------------------------------------------
TextField(int columns) 
          Constructs a new empty text field with the specified number of columns. 
----------------------------------------------------------------------------------
所以問題是
TextField tf=new TextField(20);
那么這個tf到底是多大?
是20個什么樣的單位大小?
有人說是20個字母"m"的長度  也有人說是20個"24個字母的平均長度",很多說法
我也不清楚答案,
雖然這個不重要,但是還是想暸解一下
thanx in advance

解决方案 »

  1.   

    {@link java.awt.TextField#setColumns(int)}setColumns
    public void setColumns(int columns)Sets the number of columns in this text field. A column is an approximate average character width that is platform-dependent. approximate AVERAGE character width, but platform-dependent
      

  2.   

    As for the letter 'M'in most cases, i mean displayed in most true-type-fonts, the letter M has the greatest width in all latin letters
      

  3.   

    thanks for shine333,you are a good man.
    but I event wanna know how do you find the documentation?
    this words cannot find in the jdk, really.
    U are really good and thank you for the anwser.