Hi:
I'm having trouble trying to place images in a Java GUI. Basically, I have an array that contains a 52 card deck in String form, and whenever I call one entry from the array, I want to display a gif image of that card.
For example:
if(cardarray.compareTo("King of Hearts")==0){
//display the king of hearts card (KOH.gif)
}
I looked through other forums and many people recommend using JLabel.
JLabel picLabel = new JLabel(new ImageIcon("/j.gif","joker"));
Would this work? As an addendum, I'm currently using the Netbeans IDE.