Laote's Notes
向前进就会获得信念
How to load ImageIcon in aJava applet
Posted at
8/05/2010 01:11:00 PM
// To load an ImageIcon in an applet, use this code:
ImageIcon img1 = new ImageIcon(getClass().getResource("a.jpg"));
// The following code doesn't work in an applet
ImageIcon img2 = new ImageIcon("a.jpg");
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment