This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes drawCenteredString Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "drawCenteredString" Watch "drawCenteredString" New topic


yuen tong

Joined: Oct 26, 2009
Posts: 1
i am a newbie in java. after i compile the code i have 10 errors.
every error is regarding to the drawCenteredString.
can anyone help me with this?
thanks ;p

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167

Welcome to the Ranch.

If you can post your stack trace, we can help point you in the right direction.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Rob Spoor

Joined: Oct 27, 2005
Posts: 19651

You didn't define drawCenteredString in this class.

How To Ask Questions How To Answer Questions
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2153
Before asking your next question about why the code doesn't work, read the section from the Swing tutorial on Performing Custom Painting to learn how to do custom painting properly.
It is sorta covered in the JavaRanch Style Guide.
subject: drawCenteredString
Similar Threads
Create Bar Chart
paint doesn't work
change color of an oval in a polygon
need help/suggenstion for Pop-up Frame
one last try