By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,654 Members | 1,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,654 IT Pros & Developers. It's quick & easy.

How to add online images?

P: 6
I have a question that how to add an image from an online URL into the JFrame?

This code is for local file.
Expand|Select|Wrap|Line Numbers
  1. ImageIcon picture = new ImageIcon("C:\\Users\\User\\Pictures\\abc.jpg");
  2.  
This is for picture in same folder.
Expand|Select|Wrap|Line Numbers
  1. ImageIcon picture = new ImageIcon("abc.jpg");
  2.  
But how about image from online?

Thanks.
Apr 25 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.