• Post Reply Bookmark Topic Watch Topic
  • New Topic

why JROOT pane  RSS feed

 
sushant prabhu
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks
JApplet, JFrame implement the JRoot Interface and therefore
Jrootpane is the child of JApplet and JFrame.
this actually disallows us to directly add anything to the JAPPlet or Jframe we get a reference of the Jrootpane inside
the Jframe or Japplet and add any widget/text components to Jrootpane.
in swing what is the advantage behind this concept of having a jrootpane inside a a JApplet or Jframe .
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code simplicity. Why rewrite a piece of code to handle the displaying of components for JFrame, when you can use the same code you used for JApplet. And then you could use it somewhere else as well if you chose to. It is part of the whole object oriented thing.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is some more explanation abt Root Pane and what can
be acheived with its different panes that it conatines.
http://java.sun.com/docs/books/tutorial/uiswing/components/toplevel.html#rootpane
HTH.
- satya
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!