public Font getFont() { Font[] fonts; fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); int numero = myRandom.nextInt(fonts.length); Font font = fonts[Math.abs(numero)];
public Font getFont() { if (fonts == null) {  synchronized (RandomFontGenerator.class) { if (fonts == null) { fonts = initializeFonts(); } } }  Font font = (Font) fonts.get(myRandom.nextInt(fonts.size()));
    public Font getFont()    {        Font[] fonts;        fonts =                GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();        int numero = myRandom.nextInt(fonts.length);        Font font = fonts[Math.abs(numero)];        int plus = 0;        if (getMaxFontSize() - getMinFontSize() != 0)        {            plus = Math.abs(myRandom.nextInt(getMaxFontSize()                    - getMinFontSize()));        }        Font styled = new Font(font.toString(), Font.PLAIN,                getMinFontSize() + plus);        return styled;    }