List of usage examples for java.awt SplashScreen getImageURL
@SuppressWarnings("deprecation") public URL getImageURL() throws IllegalStateException
From source file:Main.java
public static void main(String args[]) throws Exception { SplashScreen splash = SplashScreen.getSplashScreen(); splash.setImageURL(new URL("http://yourURL")); System.out.println(splash.getImageURL()); }
From source file:edu.stanford.epadd.launcher.Splash.java
public Splash() { final SplashScreen splash = (System.getProperty("nobrowseropen") == null) ? SplashScreen.getSplashScreen() : null;//from ww w . ja va2s. c o m if (splash == null) { System.out.println("SplashScreen.getSplashScreen() returned null"); return; } Rectangle r = splash.getBounds(); g = splash.createGraphics(); if (g == null) { System.out.println("splash.createGraphics() returned null"); return; } System.out.println("splash url = " + splash.getImageURL() + " w=" + r.getWidth() + " h=" + r.getHeight() + " size=" + r.getSize() + " loc=" + r.getLocation()); // setVisible(true); // toFront(); }
From source file:edu.stanford.epadd.launcher.Splash.java
public Splash() { final SplashScreen splash = (System.getProperty("nobrowseropen") == null) ? SplashScreen.getSplashScreen() : null;/* ww w . j a v a 2 s .c o m*/ if (splash == null) { System.out.println("SplashScreen.getSplashScreen() returned null"); return; } Rectangle r = splash.getBounds(); g = splash.createGraphics(); if (g == null) { System.out.println("splash.createGraphics() returned null"); return; } /* code to prevent text from appearing too pixelated - https://stackoverflow.com/questions/31536952/how-to-fix-text-quality-in-java-graphics */ Map<?, ?> desktopHints = (Map<?, ?>) Toolkit.getDefaultToolkit() .getDesktopProperty("awt.font.desktophints"); if (desktopHints != null) { g.setRenderingHints(desktopHints); } System.out.println("splash url = " + splash.getImageURL() + " w=" + r.getWidth() + " h=" + r.getHeight() + " size=" + r.getSize() + " loc=" + r.getLocation()); // setVisible(true); // toFront(); }