File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Border on an rounded JTextField? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Border on an rounded JTextField?" Watch "Border on an rounded JTextField?" New topic

Border on an rounded JTextField?

Andreas Bystrom
Ranch Hand

Joined: Mar 05, 2003
Posts: 32
I've found this example of how to make a JTextField rounded in the corners and now I wonder if someone could help me to add an border that is also rounded?
The code for the rounded textfield looks like this:

How is it possible to do a border on this JTextField that is rounded as well?
Thanks in advance!
// Andreas
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Here's how you would do it...

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: Border on an rounded JTextField?
jQuery in Action, 3rd edition