Hey guys,
I writing a program (major project actually ^^ ) and I need to set a icon (using a label) to a custom picture / path. I'm having trouble, although the IDE (I'm using NetBeans btw) doesn't show errors, it doesn't display the picture either.
Here is my code:
public void setOverview(Str ing name)
{
ImageIcon pic = new ImageIcon("/YachtPackage/"+name+".jp g");
boatOverviewLbl .setIcon(pic);
}
Thanks in advance!
I writing a program (major project actually ^^ ) and I need to set a icon (using a label) to a custom picture / path. I'm having trouble, although the IDE (I'm using NetBeans btw) doesn't show errors, it doesn't display the picture either.
Here is my code:
public void setOverview(Str ing name)
{
ImageIcon pic = new ImageIcon("/YachtPackage/"+name+".jp g");
boatOverviewLbl .setIcon(pic);
}
Thanks in advance!
Comment