This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Scrolling through your code I couldn't see any paths or any images. But then there were several hundred lines of code so probably I couldn't pick those trees out of the forest. If you have a question about JLabel and images, could you possibly just post that code and not several hundred lines of unrelated code?
You really shouldn't use the == operator to compare the contents of two String objects for equality. You should use String's equals() method if you want to do that. But in this particular case you shouldn't be comparing any Strings anyway. Here's what that code should look like instead:
Paul Clapham wrote:However I do have a comment about this code:
. . .
Whenever I see lots of if‑elses like that, I start to think that is really non‑object‑oriented code. Why are you not using a Card object? In which case your deuce can have a value of 0 and the trey a value of 1.
Actually, I have a vague memory that the cards are all worth their number value, except for the court cards: J=11, Q=12, K=13 and A=14. There would be no card with a value of 1. You also have the problem that if you put anything which is not found or matched by the selection blocks, it will return 12 as if for an ace.