• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

its a Pane

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know the difference between a Pane and a Panel. I have noticed that throughout swing, there are many types of pane.... eg JScrollPane, JTabbedPane, JOptionPane etc. Does anyone know why they are called Pane and not Panel?
If Pane represents some sort of behaviour then shouldn't there be a Pane interface ?
The reason I want to know this, is that I am creating some components that extend JPanel, and don't know whether to use a Pane or a Panel suffix.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am creating some components that extend JPanel, and don't know whether to use a Pane or a Panel suffix.


First, I don't think it matters a whole lot.
Secondly, I would note that Panel begets Applet and that JPanel begets AbstractColorChooserPanel, and I would use either of those as your precedents. In other words, use a more descriptive name (like Applet) or a class name ending in Panel. I can't find any example in the API of a Pane object begotten from the Panel or JPanel classes; however, you might if your class acts more like one of the classes ended in Pane, for example if you are deriving from Panel but your class will ultimately be a fancier form of ScrollPane.

 
rubbery bacon. rubbery tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic