aspose file tools*
The moose likes Game Development and the fly likes Two Images on the Same Panel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Two Images on the Same Panel" Watch "Two Images on the Same Panel" New topic
Author

Two Images on the Same Panel

S. Shree
Greenhorn

Joined: Jun 25, 2008
Posts: 16
How can I load two images on the same panel? and
How I use cursors to navigate with mouse keys over different panels?
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 687
    
    1
You have complete control of what is written to the the Graphics object in the paintComponent() method. Map out where you want the images to be painted and use the drawImage() method to put the images where you want them.

For observing the mouse, you would use a MouseListener. There are probably many code examples if you search for MouseListener.

Not sure what you mean by mouse keys and cursors? There are classes and methods for changing the cursor display. Again use search to find examples.
[ June 26, 2008: Message edited by: Norm Radder ]
S. Shree
Greenhorn

Joined: Jun 25, 2008
Posts: 16
hey thanks again Norm, somehow you answer quite precisely without knowing the entire code structure Everything works fine now
 
Consider Paul's rocket mass heater.
 
subject: Two Images on the Same Panel