File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes label Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic


shalini gnana
Ranch Hand

Joined: Sep 18, 2007
Posts: 189
Pls say me, how can i place the label in all co-ordinates while drawing a graph?
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Unless you want to use absolute positioning to put a Label (or JLabel) on the canvas (which is tricky), you can use the Graphics.drawchars method to paint strings of text at particular positions.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Duplicate of this thread - closing this one. Shalini, please stop posting duplicate questions - if you have additional information about a question, you can post a reply to your own original question. Having duplicate posts about the same question duplicates effort (because different people may answer each of your duplicate questions) and it also makes it harder for others that may have the same problem to find all the information associated with this question.
[ September 28, 2007: Message edited by: Nathan Pruett ]

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: label
It's not a secret anymore!