How do i align this text correctly?
I wrote this polar clock today and i am almost finished exept i want to align my text inside the line similar to this . Does anyone know how to do this? Ive tried to use FontRenderContext and font metrics but i cant seem to get it to work. Here is the whole source code so you can compile it and see for yourselves. import java.applet.Applet; import java.awt.AWTEvent; import java.awt.Color; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.Shape; import java.awt.Toolkit; import java.awt.font