Change the Font Size and Text Position
I am trying to change the font size of a text field. I would like the font that is typed in the text field to be bigger and bolded.
I have tried this, but it does does not work:
Font font1 = new Font("SansSerif", Font.BOLD, 20);
JTextField textfield = new JTextField ();
Also, I want the texted to be centered in the textfield. I have used this: