Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Subclassing JPanel and accessing components
Subclassing JPanel and accessing components [message #614594] Fri, 01 September 2006 17:05
Eclipse UserFriend
Originally posted by: eclipsenews.caboose.org.uk

I'm currently trying to create some subclasses of JPanel as templates
for pages of a wizard UI. For example I have a JPanel laid out
something like this (BasicPanel):
+------------------------------------------------+
|Page title |
+------------------------------------------------+
| |
| |
| Nested JPanel |
| |
| |
+------------------------------------------------+

and I want to create a subclass of that one like this (TextPanel):
+------------------------------------------------+
|Page title |
+------------+-----------------------------------+
| |Text |
| | |
| Image | |
| | |
| | |
+------------+-----------------------------------+

VE lets me create the subclass but when I try to drop some new
components into the nested JPanel it only lets me drop them into the
top-level JPanel. So I end up with the image and text replacing the title.

Is there some way that I can allow components to be dropped into the
nested JPanel of BasicPanel? I've tried exposing it as a property or a
public field but neither of those work.

I can add a method to get the nested JPanel and then add components to
it, but VE doesn't understand this and so doesn't display correctly.

Any suggestions?

Kevin
Previous Topic:JAR Files with Eclipse
Next Topic:VE Models interaction
Goto Forum:
  


Current Time: Mon Jun 23 15:52:41 EDT 2025

Powered by FUDForum. Page generated in 0.04432 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top