@SuppressWarnings("unchecked")
    private void loadTheme()
    {
        try
        {
            final Class<? extends Theme> clazz = (Class<? extends Theme>) MCLauncher.class
                    .getClassLoader().loadClass(
                            config.getString("window.theme"));
            final Constructor<? extends Theme> constructor = clazz
                    .getConstructor();
            theme = constructor.newInstance();
            
            System.out.println("Using custom theme '" + clazz.getSimpleName()
                    + "'...");
        }
        catch (final Exception e)
        {
            theme = new SimpleTheme();
        }
        
        theme.onLoad(api);
    }