• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

why JROOT pane

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic