Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Seth Ford   on Feb 03 In Java Category.

  
Question Answered By: Skye Hughes   on Feb 03

I have been prompted the solution:

if (image != null) {
item.setIcon(new ImageIcon(getClass().getResource(image)) {
public int getIconHeight() { return 17; }
public int getIconWidth() { return 17; }
});
}
else {
item.setIcon(new ImageIcon("") {
public int getIconHeight() { return 17; }
public int getIconWidth() { return 17; }
});
}

Share: