public int getTextWidth(Component component, String str) {
		int width = 50;
		Font font = component.getFont();
		if (font != null) {
			FontMetrics metrics = Main.getInstance().getMetrics(font);
			if (str != null && metrics != null) {
				width = metrics.stringWidth(str);
			}
		}
		width += 16;
		return width;
	}