Hello again DW. Tomorrow I have an interview and I'm trying to make a jar of my latest project. Using netbeans, I've created a jar and everything looks fine. I can see all the card IconImages in the Jlabels and it looks fine. But when I repaint the frame, the card images arent repainted. Its like the path is incorrect or something. But when I run the project, the repainting runs fine. Its only in the jar that I'm having this issue. I appreciate any help.

Here is some code:

//---------This code re sets the ImageIcon of the JLabels.
  if (comp.equals("pHand1"))
      {
              try {
          pat = getCardImagePath(card);
          }
          catch(Exception e)
          {
                System.out.println("Error999: "+e);
          }
            pHand1.setIcon(new ImageIcon(pat));
      }
//............This code is part of getCardImagePath method and gets the path based on param.  It returns the path string representing the image path.

char sut = card.getSuite();
        int nub = card.getNumb();

        if (sut == 'S')
        {
            if (nub == 14)
                path = "src/poker/resources/spades-a-75.png";
            else if (nub == 2)
                path = "src/poker/resources/spades-2-75.png";
            else if (nub == 3)
                path = "src/poker/resources/spades-3-75.png";
            else if (nub == 4)
}

scratch that, I figured it out. I just changed the image paths from "src/poker/resources/spades-a-75.png" to "../src/poker/resources/spades-a-75.png"

Dangit. I still need help with this. For some reason the image paths work fine if the jar stays in its dist folder. But if moved to another folder (such as desktop) or to another computer, the images still dont show up (I'm guessing due to the file paths).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.