how to set JPEG image to frame as background and then add
buttons on it.
rushikesh jadha -6 Junior Poster in Training
Recommended Answers
Jump to Postyou can't put Image as background to JFrame, but
1) ContentPane
2) paintComponent for JPanel / JComponent
Jump to PostThere are (as mKorbel said) a number of ways to do this, but in my personal opinion the easiest way is to subclass JPanel and override paintComponent to draw the image directly into the panel. Once you've done that all the rest of using the window (layout manager, adding conponents) …
All 7 Replies
mKorbel 274 Veteran Poster
rushikesh jadha -6 Junior Poster in Training
DavidKroukamp 105 Master Poster Team Colleague Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
mKorbel commented: for resize !0 but getWidht / getHeight +11
rushikesh jadha -6 Junior Poster in Training
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
rushikesh jadha -6 Junior Poster in Training
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.