Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Making beans from beans!  RSS feed

prem saggar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I'm studying Java Beans right now. I was wondering is their anyway to use some existing beans like a JButton bean and/or a JLabel bean to create a new bean visually? For example let's say you had to create a frame that displayed some message when an application encountered an exception. This frame states the exception (JLabel), and let's you click ok (JButton) to close the frame. This is basically a pop up window that you display to let the user know that the program has encountered something strange.
Now when I write up the events for this, and I create the new super component which I call PopUpExceptionWindow, I can't access the events generated by my JButton and my JLabel in my Bean editor. I'm using Sun Forte 4.0 community edition. Do I have to use the beancontext api to get nested components in a new bigger bean to have their events/properties picked up by the bean editor? I'm confused. I remember reading that I could not gain access to beans inside beans that are containers. Any help would be great. Thank guys, Prem.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!