Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

round JTextField/ making own min and max buttons

 
Chris Dancy
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic