When I do :
LineBorder lineBorder =new LineBorder(Color.white, 8, true);
jTextField2.setBorder(lineBorder );
I get this result like:

How can I have rounded borders without the squared corners visible and the text half cut ?
Thank you very much.
Best regards
You can override
JTextFiledbuild your own Rounded cornerJTextField. You have to override it’spaintComponent(),paintBorder(), andcontains()methods. You need to draw roundRect as the shape of text field.Example:
To see this in effect: