I have two classes in here..One extends from a Jpanel , it is where I do all the paints and staffs on my screen. The other one is just a class. But in that class I want to define a draw function..say
[ public void draw(Graphics g){
g.drawImage(image,100,100,30,30,?????);
}]
Now, I want to use this draw function to draw on my Panel.
What I want to know is, is there any built in function where I can fill in the fifth argument (which takes in the image Observer) in the draw function to access my Jpanel?
Hope you get my question..THanks LOTS!
The Java API reference for Graphics includes drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) did you have a look at his?
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.