6 changed files with 22 additions and 23 deletions
@ -1,13 +1,13 @@ |
|||||
package wiki.tall.ccmq.common.util; |
//package wiki.tall.ccmq.common.util;
|
||||
|
//
|
||||
import sun.font.FontDesignMetrics; |
//import sun.font.FontDesignMetrics;
|
||||
|
//
|
||||
import java.awt.*; |
//import java.awt.*;
|
||||
|
//
|
||||
public class ImgUtil { |
//public class ImgUtil {
|
||||
public static int getStringWidth(String text,Font f){ |
// public static int getStringWidth(String text,Font f){
|
||||
FontMetrics fm = FontDesignMetrics.getMetrics(f); |
// FontMetrics fm = FontDesignMetrics.getMetrics(f);
|
||||
int w = fm.stringWidth(text); |
// int w = fm.stringWidth(text);
|
||||
return w; |
// return w;
|
||||
} |
// }
|
||||
} |
//}
|
||||
|
Loading…
Reference in new issue