• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot Upload BMP File

 
Ben Zaidi
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am unable to load BMP files in JLabel or JButton, it appears as
empty. What am i missing, can someone help me please?

Ben
 
Ben Zaidi
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Zaidi:
Dear All,

I am unable to load BMP files in JLabel or JButton, it appears as
empty. What am i missing, can someone help me please?

I am using JDK 5.0

Ben
 
Darryl Burke
Bartender
Posts: 5155
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't say without seeing some code.
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're using an ImageIcon, then How to Use Icons should help. In particular the first paragraph.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mostly happened when path of the image is not define correctly or check the name of the file and file extension as well.

Note: if the file extension is in capital pic01.BMP and you loading file with small pic01.bmp. this wouldn't work.

hope it helps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!