This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi ,.. Can anyone tell me why do we use getContentPane() method? When we can add Components directly to the Frame why do we use getContentPane? And also Please provide me the swings hierachy.... I'm totally confusedwith this topic... Plzzz help me out
Most of swing components are lightweight which means that swing components don't allocate the platform resoures like those of awt components. Yes, for Frame and Applet, you can add them directly but for not JApplet and JFrame. You have to first getContendPane as a place holder.
In addition, you need to override the paintComponent instead of paint. If I am short, please amend it, would you JGurus?
John [ August 10, 2004: Message edited by: John McDonald ]