Executing StartUp-Code before placing Controls on Panel

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Executing StartUp-Code before placing Controls on Panel

Postby ckemmer » Tue Feb 08, 2005 3:22 am

Hello,

we have the following problem using WindowBuilderPro:

We have designed our own subclasses of nearly every Java-Swing-Control. These subclasses get information about their current LookAndFeel from our LookAndFeel-Factory, which in turn is instantiated at runtime with a concrete user-defined Non-Standard-Java-LookAndFeel using reflection. This works fine for all of our applications, as our main-methods always start with something like
- read class name for concrete Non-Standard-Java-LookAndFeel from xml-file
- instantiate a this class
- pass this new object to a LookAndFeel-Factory which can supply it to our subclassed user-defined Swing-Controls

Is there any possibility to get this user-defined piece of code executed when starting WindowBuilderPro or even when opening a new Panel-Class?

We would need something like a "startUp" or "tearDown" in JUnit-Tests which also allows reading in those configuration-entries.

Our current workaround is to hard-code one Non-Standard-Java-LookAndFeel in our LookAndFeel-Factory which is supplied to the user-defined Swing-Controls used in WindowBuilderPro.

Best regards,

Christian Kemmer
ckemmer
 

Re: Executing StartUp-Code before placing Controls on Panel

Postby Eric Clayberg » Mon Feb 21, 2005 9:50 am

ckemmer wrote:Is there any possibility to get this user-defined piece of code executed when starting WindowBuilderPro or even when opening a new Panel-Class?

Without a concrete example of what you are trying to do, I don't know.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest