I having been trying to change the font size and textposition of a textfield but I have not had any luck.
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 ();
textfield.setFont(font1);
Also, I want the texted to be centered in the textfield. I have used this:
textfield.setHorizontalTextPostion.CENTER
textfield.setVerticalTextPostion.CENTER
Thank you for your help in advance