Why can't it work like in the versions before?

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

Why can't it work like in the versions before?

Postby mkornatzki » Tue Jun 01, 2010 4:02 am

Hi,

with the actual swingdesigner (7.5xxx) i can not add components from a factory class.
With an earlier version (7.4) i have no problems.

Here is an Example:
Create the class FactoryTest and a Method like:
Code: Select all
   public static JLabel createLabel() {
      return new JLabel("Hallo");
   }


Then click on palette in swingdesigner and select addStaticFactory and then multiple...
In Version 7.4 i can then select the methods and have a new component on the palette.
With 7.5xxx i get the message "Factory class de.parcit.FactoryTest contains no factory methods."

cheers, michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Why can't it work like in the versions before?

Postby Eric Clayberg » Tue Jun 01, 2010 5:24 am

Factory classes work the same in v7.5 as they did in v7.4.

Factory classes should end with the word "Factory" to make all of its methods factory methods or you need to add a "@wbp.factory" tag to the class or to each separate method.

Change the class name from FactoryTest to TestFactory, and it should be fine.
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

Re: Why can't it work like in the versions before?

Postby mkornatzki » Tue Jun 01, 2010 5:38 am

i'm so sorry.
my example was wrong :( (but works in 7.4) and it seems that my factory.xml is wrong too.

thanks, michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Why can't it work like in the versions before?

Postby Eric Clayberg » Tue Jun 01, 2010 10:39 am

What factory.xml are you referring to?
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