Question: Type in and run the following program. Then modify it to show a different greeting and image. import java.net. URL; import javax.swing.ImageIcon; import javax.swing.JOptionPane; public
Type in and run the following program. Then modify it to show a different greeting and image.

import java.net. URL; import javax.swing.ImageIcon; import javax.swing.JOptionPane; public class Test { } public static void main(String[] args) throws Exception { } URL imageLocation = new URL( "http://horstmann.com/java4everyone/duke.gif"); JOptionPane.showMessageDialog(null, "Hello", "Title", JOptionPane.PLAIN_MESSAGE, new ImageIcon (imageLocation));
Step by Step Solution
3.49 Rating (159 Votes )
There are 3 Steps involved in it
The code provided in the image is a simple Java program that uses the Swing library to display a dialog box with a greeting message Hello and an image loaded from a given URL Before modifying the code ... View full answer
Get step-by-step solutions from verified subject matter experts
