Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why cannot display cat.bmp Format image??How to display it??

sunnycodeMay 3 2007 — edited May 4 2007
Dear Friends:

I can use JLabel to display Icon with cat.GIF or cat.JPG format, but cannot display cat.bmp Format, why??


For example,

I define
JLabel jlabel = new JLabel();

then I can display:
			jlabel.setIcon(new ImageIcon("images/cat.GIF"));
to display Cat image, but if I use
			jlabel.setIcon(new ImageIcon("images/cat.bmp"));
so thiere is nothing to display, why??

How to display images/cat.bmp ??

Please help
Thanks so much
sunny
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2007
Added on May 3 2007
7 comments
260 views