Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing graphics object about to draw on

Status
Not open for further replies.

Chrissirhc

Programmer
May 20, 2000
926
GB
Hello this may seem a little random but I'm hoping someone has come across this error before. I have an object heirarchy with the top class called x it has a method called public void abstract paintMe(Graphics g) then y extends from it it has public void paintMe(Graphics g)
{
g.drawLine(the parameters);
}

(This isn't my program but I just trying to explain more generally)

x chris = new y()
Anyway I have a panel class which says in the paintComponent method x.paintMe(getGraphics())
Why won't the stuff draw. I know that y is there because I've got other methods that allow me to click on a x or y and then it says what it is. So its just comming up invisble. Can anyone help?.

Chris
 
Please ignore this message. I sorted out the problem it was just a mistake somewhere which needed some debugging. Would turn this off but don't know how.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top