• 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.

 
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
Saloon Keeper
Posts: 3138
72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing forum.
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • 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!