java - Trouble getting JOptionPane to open up an image from a website -
i want joptionpane open images link, because have assignment due next week have include images in joptionpane, , while works local files i'm not sure if that'll show when turn in. anyways, have is:
imageicon thing = new imageicon("http://i.imgur.com/ogxr68g.jpg"); string[] finaloutputchoices = {"help", "please"}; int finaloutput = joptionpane.showoptiondialog( null // , "message" // , "final output" // , joptionpane.yes_no_option // , joptionpane.plain_message // , thing // , finaloutputchoices // , "awesome" // );
if replace link path image on desktop works, doesn't link.
any help appreciated :)
works url object.
imageicon thing = new imageicon(new url("http://i.imgur.com/ogxr68g.jpg"));
ps: weird image ;-)
java joptionpane
No comments:
Post a Comment