package class3_2_BigImage;// Dr. Yoder. MSOE. 13 December 2016 import javax.swing.*; import java.net.MalformedURLException; import java.net.URL; public class BigImage { public static void main(String[] args) throws MalformedURLException { System.out.println("Debug: starting to load remote image"); // try { // Thread.sleep(3000); // simulate a long load time // } catch (InterruptedException e) { // e.printStackTrace(); // TODO: Something more meaningful // } // the following may take some time to execute // if the imageURL is on a slow remote server URL url = new URL("http://eoimages.gsfc.nasa.gov/images/imagerecords/79000/79765/dnb_land_ocean_ice.2012.13500x6750.jpg"); ImageIcon largeImage = largeImage = new ImageIcon(url); System.out.println("Done loading image."); // http://earthobservatory.nasa.gov/Features/NightLights/page3.php // http://eoimages.gsfc.nasa.gov/images/imagerecords/79000/79765/dnb_land_ocean_ice.2012.13500x6750.jpg -- sometimes loads on campus // http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73580/world.topo.bathy.200401.3x21600x21600.C2.jpg -- fails to load from home machine // http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73580/world.topo.bathy.200401.3x21600x10800.jpg -- also fails to load // https://www.google.com/search?q=very+high+resolution+image+earth&source=lnms&tbm=isch&sa=X&ved=0ahUKEwid0cGXkYDLAhVhmoMKHR72B54Q_AUIBygB&biw=1270&bih=865#q=very+high+resolution+image+earth&tbm=isch&tbs=isz:lt,islt:70mp&imgrc=8jYzHBBfu11rKM%3A // URL url = new URL("http://assets.overclock.net.s3.amazonaws.com/f/f7/f740be93_vbattach181511.jpeg"); } }