I\'m having trouble centering a JTexfield in my program.The Textfield does not appear aligned with the JButton. I\'ve tried using the x.setHoriontalAlignment(JTextfield.CENT
Just use the setBounds attribute.
setBounds
Jtextfield.setBounds(x,x,x,x);
The first x moves the TextField to the left or right. The second one moves it up or down. The third is the width and the last is the length.
TextField