Commit 2d2d1fdf authored by ogg.k.ogg.k's avatar ogg.k.ogg.k
Browse files

more JDK 1.1 compatibility

parent 01a3f4ba
......@@ -317,9 +317,8 @@ public class Status extends Component implements MouseListener,
g.setFont(boldFont);
FontMetrics fm = g.getFontMetrics();
LineMetrics lm = fm.getLineMetrics("CC", g);
float cc_w = fm.stringWidth("CC");
float cc_h = lm.getAscent()-lm.getDescent();
float cc_h = fm.getAscent()-fm.getDescent();
float button_midx = sb.x + sb.width/2.0f;
float button_midy = sb.y + sb.height/2.0f;
g.drawString("CC", (int)(button_midx - cc_w/2.0f + 0.5f), (int)(button_midy + cc_h/2.0f + 0.5f));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment