public static final Font3D BIGBOLD = new Font3D(new Font("sans-serif", Font.BOLD, 3), tolerance, null);
public LabelModel(String text, Color3f fg, Color3f bg, Font3D font) {
Text3D geom = new Text3D(font, text, new Point3f(0.0f, 0.0f, 0.0f), Text3D.ALIGN_CENTER, Text3D.PATH_RIGHT);
BoundingBox b = new BoundingBox();
geom.getBoundingBox(b);
Point3d upper = new Point3d(), lower = new Point3d();
b.getLower(lower);
b.getUpper(upper);
// Workaround for a bounding box bug -- assumes that M and ( have same ascent
GlyphVector fix = font.getFont().createGlyphVector(new FontRenderContext(null, false, false), "M(");
Point3d fixu = new Point3d(), fixl = new Point3d();
font.getBoundingBox(fix.getGlyphCode(0), b);
b.getUpper(fixu);
b.getLower(fixl);
double h1 = fixu.y-fixl.y;
font.getBoundingBox(fix.getGlyphCode(1), b);
b.getUpper(fixu);
b.getLower(fixl);
double h2 = fixu.y-fixl.y;
upper.y = h1;
lower.y = h1-h2;
Switch sw = new Switch(Switch.CHILD_MASK);