|
-
How to use constructor from one class to draw image in another
Hi, I am having problems making a constructor for a image so that I can call it whenever I want from another class. The problem Im having is that I dont know what to put in g.drawImage(blah, blah, blah, THIS SECTION). I know normally you put "this" but I need to call it into another class..
Obstacle Class:
public class Obstacle
{
public void drawUrn(Graphics g, String obstacle, int x, int y)
{
g.drawImage(obstacle, x, y, );
}
}
what would I need to do so I can call that in my Player.class?
Similar Threads
-
By Osiris43 in forum .NET
Replies: 1
Last Post: 08-04-2006, 12:15 PM
-
By pentacle1 in forum Java
Replies: 0
Last Post: 01-21-2006, 11:54 PM
-
Replies: 5
Last Post: 01-15-2006, 07:10 PM
-
Replies: 5
Last Post: 10-17-2002, 01:58 PM
-
Replies: 3
Last Post: 08-30-2001, 11:45 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks