Vincent Roye
Vincent Roye

Reputation: 2851

JTextArea Rounded corners Java Swing

I would like to know how it is possible to do a JTextArea and a JTextField with rounded corners and rounded borders (I am using java swing)

Thank you very much.

Regards

Upvotes: 2

Views: 4509

Answers (1)

勿绮语
勿绮语

Reputation: 9320

Border roundedBorder = new LineBorder(Color.green, 5, true); // the third parameter - true, says it's round
someTextArea.setBorder(roundedBorder);

Upvotes: 9

Related Questions