Java Swing Tutorial - Java SplashScreen.setImageURL(URL imageURL)








Syntax

SplashScreen.setImageURL(URL imageURL) has the following syntax.

public void setImageURL(URL imageURL)   throws NullPointerException ,    IOException ,    IllegalStateException

Example

In the following code shows how to use SplashScreen.setImageURL(URL imageURL) method.

import java.awt.SplashScreen;
import java.net.URL;
/*w  w w .  j  av  a2  s. c o m*/
public class Main {
  public static void main(String args[]) throws Exception{
    SplashScreen splash = SplashScreen.getSplashScreen();
    splash.setImageURL(new URL("http://yourURL"));
    System.out.println(splash.getImageURL());
  }
}