Drawing images?

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 417 Views - Last Post: 12 September 2012 - 08:30 PM Rate Topic: -----

#16 pbl  Icon User is offline

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

Reputation: 8032
  • View blog
  • Posts: 31,202
  • Joined: 06-March 08

Re: Drawing images?

Posted 12 September 2012 - 07:47 PM

this is a strange path
here = new ImageIcon("/Unnamed Game/res/Image.png").getImage();

add
File f = new File(".");
System.out.println(f.getAbsolutePath());

to your setImage() method we'll see where your code is ... and we'll try to figure out where your Image is relatively located
Was This Post Helpful? 0
  • +
  • -

#17 picyoko  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 10-September 12

Re: Drawing images?

Posted 12 September 2012 - 08:08 PM

C:\Projects\Unnamed Game\.

That's the output
Was This Post Helpful? 0
  • +
  • -

#18 pbl  Icon User is offline

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

Reputation: 8032
  • View blog
  • Posts: 31,202
  • Joined: 06-March 08

Re: Drawing images?

Posted 12 September 2012 - 08:14 PM

so you are already in /Unnamed Game
the path to your Image is
"res/Image.png"
Was This Post Helpful? 0
  • +
  • -

#19 picyoko  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 10-September 12

Re: Drawing images?

Posted 12 September 2012 - 08:23 PM

That Fixed it!!!

Thanks :D
Was This Post Helpful? 0
  • +
  • -

#20 pbl  Icon User is offline

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

Reputation: 8032
  • View blog
  • Posts: 31,202
  • Joined: 06-March 08

Re: Drawing images?

Posted 12 September 2012 - 08:30 PM

No problem

after more than 15 replies, was about time :)
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2