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 can apply this to a textbox already created with a border
jTextField1.setBorder(BorderFactory.createCompoundBorder(jTextField1.getBorder(), BorderFactory.createEmptyBorder(6, 6, 6, 6)));