how to get width of text in textfifeld in swing code example Example: textfield set size textField.setColumns(...);