Hi,
I'm trying to set a background image of a JFrame. I researched on google but i haven't gotten anything to work. My idea is to make monopoly with the board in the background and have the pieces move around on top of the board.
Thanks in advance
Hi,
I'm trying to set a background image of a JFrame. I researched on google but i haven't gotten anything to work. My idea is to make monopoly with the board in the background and have the pieces move around on top of the board.
Thanks in advance
Extend JPanel to override paintComponent() and draw your image on the panel. You can place that panel component in your JFrame.
Example here: http://www.java2s.com/Code/Java/Swing-JFC/Panelwithbackgroundimage.htm
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.