private void initonce() {
        if (initedonce)
            return;
        initedonce = true;
        try {
            Resource.addurl(new URL("https", getCodeBase().getHost(), 443, "/res/"));
        } catch (java.net.MalformedURLException e) {
            throw (new RuntimeException(e));
        }
        if (!Config.nopreload) {
            try {
                InputStream pls;
                pls = Resource.class.getResourceAsStream("res-preload");
                if (pls != null)
                    Resource.loadlist(pls, -5);
                pls = Resource.class.getResourceAsStream("res-bgload");
                if (pls != null)
                    Resource.loadlist(pls, -10);
            } catch (IOException e) {
                throw (new Error(e));
            }
        }
    }