TextOutline { Point2D getLastGlyphCenter() { return getGlyphCenter(text.length() - 1); } TextOutline(final String text, final Font font);   TextOutline(String text, GlyphVector glyphs); private  TextOutline(String text, GlyphVector glyphs, Shape outline, AffineTransform transform); @Override String toString(); static final FontRenderContext FONT_RENDER_CONTEXT; }
@Test public void testGetLastGlyphCenter() throws Exception { TextOutline original = new TextOutline("Cl", font); Point2D oCenter = original.getCenter(); Point2D tCenter = original.getLastGlyphCenter(); assertThat(tCenter.getX(), greaterThan(oCenter.getX())); }