Quantcast

Maximum PC

It is currently Fri Aug 29, 2014 10:38 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: (java) centering g.drawString
PostPosted: Fri Jan 23, 2009 8:21 pm 
Team Member Top 1000
Team Member Top 1000
User avatar

Joined: Wed Jul 02, 2008 1:41 pm
Posts: 252
say you have
Code:
g.drawString("Hello World!", x, y);


y's fine because the font size is relative but anyone know how to set x so that regardless of the string being drawn it's center in the window?

I tried googling it haven't found anything but I will probably continue to do so unless someone replies.

thanks for any help you guys can provide


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group