• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create Java bean container components?  RSS feed

Mark McKay
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've designed a simple Swing component (a dropdown/foldout container) that I'd like to use as a Java bean. It's built on top of a JPanel and has a button and a label on the top and a viewport area in the middle that displays child components. The idea is that if you press the button the viewport toggles between displaying and not displaying. The viewport area works similarly to the way the JScrollpane viewport does.

Anyhow, I'm a Netbeans user and would like to use this bean I've developed as one of the beans I have available to build GUIs with. While I can register it as a bean in Netbeans' components palette and drag and drop it onto a new JPanel I've created, I can't figure out a way to let netbeans know it has this viewport area that child components can be dropped into. Is there a way to indicate this in the bean specification?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!