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));
yourTextFeildVariable.setBorder(BorderFactory.createCompoundBorder(yourTextFeildVariable.getBorder(), BorderFactory.createEmptyBorder(0, 5, 0, 0)));
This is working 100%