• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Can I use Different shape of Buttons???

 
sandhiya sindhi
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How Can I use Different shape of Buttons... there is no constructor through wich we set size of button and its angles..
Like as a round Button or a like Star Button.
[ October 01, 2003: Message edited by: sandhiya Laghari ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to do all this yourself... extend JComponent, override the paintComponent() method to draw whatever shape you want, enable ActionEvents on the component, and add a MouseListener that fires ActionEvents whenever it gets a click inside the shape you have drawn.

Easy as pie.
 
sandhiya sindhi
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u very much Mr Nathan for giving this idea.
I'm so Gad to get solution of this
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic