Hello, I'm a beginning Java programmer and I am having a little trouble importing images into a GUI.
I am working on a Blackjack game which utilizes a GUI. I want to paint images of cards, words etc. without using ImageIcons or Labels etc. So I made a custom class which extends JPanel that will use Graphics2D.
Everything works fine except I am unaware as to how I should import Image objects into my program to be painted. When in applets I simply use getImage(getCodeBase(),""); since I am in an applet, but this obviously doesn't apply in a JPanel. I am not interested in using a JApplet, so if there are any other ways to import images I would prefer to use those.
EDIT: Should have read the top of the message board... either way if you guys actually need code I can provide it but I don't believe it is necessary.
tl;dr How do you import an AWT Image into a JPanel?