This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

background image in JPanel or JFrame

 
Rishabh Rathi
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I want to insert a background image ( .jpg , .gif , .png ) to my JPanel( or JFrame) form to make it look attractive.
PLease suggest the code for it.
 
Paul Clapham
Sheriff
Pie
Posts: 20196
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Perhaps you might find this surprising, but since Java was invented over a decade ago, you are not the first person to ask this question. In fact you aren't even close to being first. If you use the google keywords "jpanel background image" you will find numerous examples. (Not to mention numerous other posts from people who didn't search before posting!)
 
Rob Spoor
Sheriff
Pie
Posts: 20388
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
We even have an FAQ entry for it.
 
Rob Camick
Ranch Hand
Posts: 2475
8
  • 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Also, you where given the same answer when you posted the same question over an hour ago!

http://www.coderanch.com/t/532226/GUI/java/add-background-image-JPANEL

Ignoring peoples answers and wasting our time is NOT a good way to get help in the future.
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Rob Camick wrote:Also, you where given the same answer when you posted the same question over an hour ago!.

Two days and an hour.
 
Rob Spoor
Sheriff
Pie
Posts: 20388
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
But it still wasted my time because the link I posted was already posted. I'm annoyed now so this thread is closed.

(Well, not because I'm annoyed but because one should UseOneThreadPerQuestion )
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic