How can I add some padding to a jtextfield? I\'ve tried tf.setMargin(new Insets(5,5,5,5)); which doesn\'t have any effect.
tf.setMargin(new Insets(5,5,5,5));
you have look at CompoundBorder, there you can set LineBorder(Color.gray, 1) and with
LineBorder(Color.gray, 1)
EmptyBorder(5, 5, 5, 5)