3 Replies - 1464 Views - Last Post: 19 March 2010 - 04:51 PM Rate Topic: -----

#1 Guest_Karolis*


Reputation:

JApplet Image

Posted 19 March 2010 - 12:54 PM

How do I put an image on a button in JApplet ??? I tried to put it on like this:

public ImageIcon back = new ImageIcon("back.jpg");
button.setIcon(back);

but in the web browser it failed and didint opened , when i remowe ""public ImageIcon back = new ImageIcon("back.jpg");"" this line it works corectly if i put it in it fails
HELP PLS.. :)

Is This A Good Question/Topic? 0

Replies To: JApplet Image

#2 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2874
  • View blog
  • Posts: 11,032
  • Joined: 15-July 08

Re: JApplet Image

Posted 19 March 2010 - 01:02 PM

You have to get the resource for it:
http://www.dreaminco...ndpost&p=964464

If that doesn't fix it, please post your JApplet code here. :code:
Was This Post Helpful? 1
  • +
  • -

#3 Guest_Guest*


Reputation:

Re: JApplet Image

Posted 19 March 2010 - 01:40 PM

Thanks , that helped a lot :)
Was This Post Helpful? 0

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8334
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: JApplet Image

Posted 19 March 2010 - 04:51 PM

View PostDogstopper, on 19 March 2010 - 02:02 PM, said:

You have to get the resource for it:
http://www.dreaminco...ndpost&p=964464

If that doesn't fix it, please post your JApplet code here. :code:

I'll put that one in my Favorites question asked so many times
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1