jQuery in Action, 3rd edition
The moose likes Swing / AWT / SWT and the fly likes round JTextField/ making own min and max buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "round JTextField/ making own min and max buttons" Watch "round JTextField/ making own min and max buttons" New topic
Author

round JTextField/ making own min and max buttons

Chris Dancy
Ranch Hand

Joined: Feb 14, 2006
Posts: 136
got a couple of quick questions if anyone can help me out. I want a JTextField with rounded corners. My Thought was to subclass JTextField and override paintComponent and just draw a roundRectangle, yet when i do this, the textfield turns to nothing...any ideas?

And second question, if i wanted to make my own min and max and close buttons in my frame, what do I over ride to do so?


("Anger is not an emotion, its a symptom of fear.")
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> I want a JTextField with rounded corners.

http://forum.java.sun.com/thread.jspa?forumID=57&threadID=260846

> if i wanted to make my own min and max and close buttons in my frame,

probably easier to frame.setUndecorated(true), then build your own button panel
and put it into BorderLayout.NORTH
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: round JTextField/ making own min and max buttons
 
It's not a secret anymore!