Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

drawing circle with label inside

 
Fano Hery
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to draw filled circle with label inside it for example "A" inside the circle. Anyone can help me?
 
Maneesh Godbole
Saloon Keeper
Posts: 11185
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

What have you got so far, and where are you stuck?
Usually, one would
1) Override the paintComponent method
2) Use the reference to Graphics g and invoke the required method on the "g" instance. e.g. http://faq.javaranch.com/java/BackgroundImageOnJPanel
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You forgot step 1a) call super.paintComponent(g).
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic