Here you can find the source of drawStringRight(final Graphics g, final FontMetrics m, final String str, final int x, final int y)
public static void drawStringRight(final Graphics g, final FontMetrics m, final String str, final int x, final int y)
//package com.java2s; import java.awt.FontMetrics; import java.awt.Graphics; public class Main { public static void drawStringRight(final Graphics g, final FontMetrics m, final String str, final int x, final int y) { g.drawString(str, x - m.stringWidth(str), y); }/*from w w w. j av a 2 s .c o m*/ }