Welcome to the Ranch! Can you please
UseCodeTags next time? I've added them for you this time.
Now, to the problem.
The first line does not create a text field with contents "10" but a text field that will be large enough to show 10 characters. Its content is still empty (""). To get a JTextField to show the value "10" you must a) use textField.setText("10"), or b) create it using a
String value (new JTextField("10")).