A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
drawing circle with label inside
Joined: Jul 13, 2010
Jul 13, 2010 23:37:13
i want to draw filled circle with label inside it for example "A" inside the circle. Anyone can help me?
Joined: Jul 26, 2007
Jul 13, 2010 23:51:32
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.
How to ask questions
Donate a pint, save a life!
Onff-turn it on!
Joined: Oct 27, 2005
Jul 14, 2010 12:55:51
You forgot step 1a) call super.paintComponent(g).
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
subject: drawing circle with label inside
Applet Draw shape
Creating your own class
Can anyone tell me how to draw something(example: circle,lines ) on an image ?
how to draw shapes with mouse?
Draw a Shape by selecting(combox) its color and clicking a button
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015