• 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

iIlegal Argument Exception

 
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,
I know that when a container is added to itself there is an IllegalArgumentException. But I also know that we can add panel to a panel. Can anybody explain me what is exactly IllegalArgumentException.
Thanks.
 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm, lets see
i think this exception is thrown because the container class is abstract, with concrete implementations provided by Panel, Scrollpane, and Window.
Panel is an offshoot of Container, without menus,and additional components like scrollbars. It is a concrete implementation, and thus may contain other Panels.
PS: note that Panel is the superclass of Applet
did i get you correctly?
chetan
 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi chetan ,
I think here i am not agree with one point. Container class is not abstract class now. it was in java1.1 but now it is normal class.
vivek

 
KN
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,
I agree with Vivek. Container class is not abstract now. I still don't know why adding panel to a panel doesn't give Exception while adding a container to itself produces IllegalArgumentException. Is there something I am missing in the definition of IllegalargumentException.
Thanks,
Kiran.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic