Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I have an image class and a game class. I want to display the image onto my game.  RSS feed

 
Michael Wal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys, I have a class that retrieves an image, and a class that is a game. I want to put my image onto the game to use it as the main figure. As of right now in eclipse, the game class runs, so the game works, but the image doesn't do anything. Would you guys be able to help me on putting the image into the game? I really appreciate it! Thank you!
Here is my image class:

And here is my game class


Any help is appreciated!!
 
Tony Docherty
Bartender
Posts: 3200
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing forum.
 
Rob Camick
Ranch Hand
Posts: 2752
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You DisplayImage class is a JPanel, so you can use it just like any other JPanel.

//JPanel p = new JPanel();
DisplayImage p = new DisplayImage();

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!