Results 1 to 2 of 2
Thread: Overriding question
- 08-16-2010, 06:50 AM #1
Ok i understand overriding as basically a subclass using the same method name as its super class, just so everything looks more organised etc.
But what about the built in method paintComponents(Graphics g) ?
it seems that when i override this built in method, im still getting the funnctionality of this method plus whatever it is i want to do, ie paint something.
I thought when you override a super's method, u basically just using the same name and ur own code, and no code from the super.
could someone clarify this for me pleaseTeaching myself java so that i can eventually join the industry! Started in June 2010
- 08-16-2010, 12:04 PM #2Senior Member
- Join Date
- Jun 2007
- Bali, Indonesia
- Rep Power
Can you post the code so that we can see how did you override the paintComponents(Graphics g) method.Website: Learn Java by Examples
- By matin1234 in forum New To JavaReplies: 3Last Post: 06-01-2010, 05:35 AM
- By renuka_renukut in forum Advanced JavaReplies: 3Last Post: 05-21-2010, 09:45 AM
- By AndrewM16921 in forum New To JavaReplies: 2Last Post: 09-23-2009, 07:26 AM
- By MithunDhar in forum New To JavaReplies: 3Last Post: 04-06-2009, 09:02 AM
- By raghu in forum Advanced JavaReplies: 1Last Post: 01-22-2008, 01:38 AM