aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Calling the paint() method of superclass() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Calling the paint() method of superclass()" Watch "Calling the paint() method of superclass()" New topic
Author

Calling the paint() method of superclass()

Shyam Prasad Murarka
Ranch Hand

Joined: May 02, 2005
Posts: 209
Dear Readers,
Belated Merry X'Mas. Can over-rided methods of superclass be called??
This is what I have:




Please suggest on what I should do if the above technique is not possible. This is because the basic layout of the Graph will be painted by the superclass paint() method.

With Best Regards,
Shyam Prasad Murarka


With Best Regards,
Shyam Prasad Murarka
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
you should be using paintComponent(), instead of paint()
then BarGraph's code becomes

Shyam Prasad Murarka
Ranch Hand

Joined: May 02, 2005
Posts: 209
Dear Readers,
Thanks very much Michael. I shall try that out very soon.
Brian Cole
Author
Ranch Hand

Joined: Sep 20, 2005
Posts: 862
How did you embolden text within a code block?
I didn't think that was possible on javaranch.


bitguru blog
Shyam Prasad Murarka
Ranch Hand

Joined: May 02, 2005
Posts: 209
Dear Readers,
Well, just nest up the tags.
Instead of these signs '<' and '>' you have to use the normal ones like '[' and ']'. I used it here so that you could see it without that also getting parsed.

<code>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling the paint() method of superclass()