Swing designer problem

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

Swing designer problem

Postby mickey@birosoft.com » Sat Jul 24, 2004 2:36 am

I'm evaluating SWT/Swing designer 2.0.1 and I have one question. When I make changes on some Swing component every time Swing designer shows a window which reflects those changes and then those changes are posted to form in eclipse desing window. This window slows down creation of Swing forms because with every form change I waste a couple seconds while swing designer updates those changes. It is showed even if I change variable name of swing component. Can I tell Swing designer to stop showing this window?
mickey@birosoft.com
 

Re: Swing designer problem

Postby Eric Clayberg » Sun Jul 25, 2004 7:31 am

mickey@birosoft.com wrote:I'm evaluating SWT/Swing designer 2.0.1 and I have one question. When I make changes on some Swing component every time Swing designer shows a window which reflects those changes and then those changes are posted to form in eclipse desing window. This window slows down creation of Swing forms because with every form change I waste a couple seconds while swing designer updates those changes. It is showed even if I change variable name of swing component. Can I tell Swing designer to stop showing this window?

Are you seeing that window fully on-screen or down in the lower-right corner? That window is used as the source of the images that appear within Designer, so you can't turn it off. With the default settings in effect, it should be almost entirely off screen.
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: Swing designer problem

Postby mickey@birosoft.com » Sun Jul 25, 2004 2:02 pm

Eric Clayberg wrote:Are you seeing that window fully on-screen or down in the lower-right corner? That window is used as the source of the images that appear within Designer, so you can't turn it off. With the default settings in effect, it should be almost entirely off screen.


I see it fully on-screen about 1-2 seconds and after that my Eclipse app get focus. Time which those frame occupie is worse with puting more and more components on Swing from.
mickey@birosoft.com
 

Re: Swing designer problem

Postby Eric Clayberg » Sun Jul 25, 2004 6:17 pm

mickey@birosoft.com wrote:I see it fully on-screen about 1-2 seconds and after that my Eclipse app get focus. Time which those frame occupie is worse with puting more and more components on Swing from.

Where on the screen do you see it? How big is your display? Make sure that the "Use Swing Preview" option is turned off (Designer > General pref page).
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: Swing designer problem

Postby Guest » Mon Jul 26, 2004 1:21 am

Eric Clayberg wrote:Where on the screen do you see it? How big is your display? Make sure that the "Use Swing Preview" option is turned off (Designer > General pref page).


It depends what kind form I create. If I'm creating JFrame window has a normal size of that JFrame. When I'm creating JPanel, window which disturbs me has a full size of my screen (1280x1024). Use Swing Preview option is turned off by default. BTW, I'm using Eclipse 3.0 for Linux. I installed Eclipse on Win98 and tried Swing Designer and didn't noticed this problem on Windows platform. On Windows I don't have a option "Use Swing Preview". So, this problem occur only on Linux GTK for me.
Guest
 

Re: Swing designer problem

Postby Eric Clayberg » Mon Jul 26, 2004 6:15 am

Anonymous wrote:It depends what kind form I create. If I'm creating JFrame window has a normal size of that JFrame.

Where on the screen does the window appear (upper-left corner, lower-right corner, somewhere else)? I'm not seeing what you are describing on my Linux system (one of the problems though is that various Linux distributions often work quite differently).

Anonymous wrote:I'm using Eclipse 3.0 for Linux. I installed Eclipse on Win98 and tried Swing Designer and didn't noticed this problem on Windows platform. On Windows I don't have a option "Use Swing Preview". So, this problem occur only on Linux GTK for me.

The underlying problem is due to limitations in Eclipse/Linux that aren't present in Eclipse/Windows. Under Windows, the widget graphics can be created off screen. This does not work under Linux, so the preview graphics need to be created on the main display.
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: Swing designer problem

Postby Guest » Tue Jul 27, 2004 6:24 am

Eric Clayberg wrote:
Anonymous wrote:It depends what kind form I create. If I'm creating JFrame window has a normal size of that JFrame.

Where on the screen does the window appear (upper-left corner, lower-right corner, somewhere else)? I'm not seeing what you are describing on my Linux system (one of the problems though is that various Linux distributions often work quite differently).

Anonymous wrote:I'm using Eclipse 3.0 for Linux. I installed Eclipse on Win98 and tried Swing Designer and didn't noticed this problem on Windows platform. On Windows I don't have a option "Use Swing Preview". So, this problem occur only on Linux GTK for me.

The underlying problem is due to limitations in Eclipse/Linux that aren't present in Eclipse/Windows. Under Windows, the widget graphics can be created off screen. This does not work under Linux, so the preview graphics need to be created on the main display.


Well that's OK. But, is this reason why creating of Swing forms became slower and slower while form complexity increasing?
Guest
 

Re: Swing designer problem

Postby mickey@birosoft.com » Thu Jul 29, 2004 2:20 pm

Well that's OK. But, is this reason why creating of Swing forms became slower and slower while form complexity increasing?


Do you answer to my question?
mickey@birosoft.com
 

Re: Swing designer problem

Postby Eric Clayberg » Fri Jul 30, 2004 4:21 am

Anonymous wrote:Well that's OK. But, is this reason why creating of Swing forms became slower and slower while form complexity increasing?

I don't know. I am not seeing the same behavior you describe, so I can't be usre. It is certainly a possibility though.
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

It SLOWS DOWN so that it's impossible to work with it !

Postby bronek » Fri Oct 08, 2004 3:12 am

It is true - I have a form with SpringLayout, I have a JTabbedPane - and about 20 controls on each tab. After working about 20 minutes with the designer it slows down - and after clicking a component I have to wait 20 (twenty!!) seconds to se the component is choses, and to see it's properties. After changing a property (or moving a component) I wait up to 30 (thirty!) seconds so that I can work. It's horror !! When I restart Eclipse I have another 20 minutes of normal work, but every change done to a component slows down the Designer. Also - wersion 2.1.0 after some operations had 1.2 GB of memory taken by the javaw process. When I use copy/paste its even worse - I have to restart Eclipse sooner. So - my work looks like this - draw about 5 components, change their properties and restart eclipse.
I have now the 2.1.1 version - and it's still horrible ! We've chosen to use the SwingDesigner because using Spring Layout it's possible to make forms quicker than with other layouts - but now it's worse !. My company bought your designer but I begin to think it's a mistake.
bronek77@gazeta.pl
bronek
 

Re: It SLOWS DOWN so that it's impossible to work with it !

Postby Eric Clayberg » Fri Oct 08, 2004 3:31 am

bronek wrote:It is true - I have a form with SpringLayout, I have a JTabbedPane - and about 20 controls on each tab. After working about 20 minutes with the designer it slows down - and after clicking a component I have to wait 20 (twenty!!) seconds to se the component is choses, and to see it's properties. After changing a property (or moving a component) I wait up to 30 (thirty!) seconds so that I can work. It's horror !! When I restart Eclipse I have another 20 minutes of normal work, but every change done to a component slows down the Designer. Also - wersion 2.1.0 after some operations had 1.2 GB of memory taken by the javaw process. When I use copy/paste its even worse - I have to restart Eclipse sooner. So - my work looks like this - draw about 5 components, change their properties and restart eclipse.

If you simply close and re-open the editor (rather than closing down Eclipse), does it make any difference?

If the problem limited to SpringLayout, or does it happen with any layout on your machine?

How much physical memory does your machine have (more or less than 1GB)?

How do you have Eclipse configured to use memory (e.g., what are your Eclipse startup parameters)?
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

Postby bronek » Fri Oct 08, 2004 4:32 am

When I reopen the editor - it does not help - I have to restart Eclipse. I don't use many other layouts - I have some BorderLayout and BoxLayout - the 'detail panels' are on those layouts, and components on the 'detail panels' are on SpringLayout.
I have 512 MB phisical memory, i tried default settings of Eclipse, and also -Xms128M and -Xms256M. When I have more memory it looks better in the begining but after some component-moving and changing property - it still slows down and after some time.
And - it's not only on my machine - on my workmate machine the same thing happens - he told me to restart eclipse, so that I coud work ;)

thanks for the interest :)
bronek
 

Postby Eric Clayberg » Mon Oct 11, 2004 10:53 am

We have release a v2.1.1 update that should dramatically improve this situation. Please give it a try and let us 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

Postby bronek » Wed Oct 13, 2004 1:53 am

I can't say if it is better or not - I started to change some of the components from lolac variables to fields - and the designer does not paint the form in the design-time any more ;) I just see nothing in stead of my form - but it's not the problem - I'll get previous version from CVS - it's only 3 hours of my work lost ;)
But - another major bug can be found in the SwingDesigner - when I use borders (for example a titled border) on a panel where SpringLayout is - components on the panel behave very strange - when I try to move a component to a specicif place - it moves to another one (sometimes below, sometimes above and to the right or left). It's imposible to place a component where I want it to be placed. So - SpringLayout + border = trouble. I can't use Titled borders with the SpringLayout - using the SwingDesigner, of course - and it's a disaster - I love titled borders ;).
sorry for my complaining - your tool seems to be OK (the only real tool with SpringLayout) - but it has some bugs that (I hope) can be easily found and repaired - and they (the bugs) make using your tool very anoying sometimes. In about two days I'll write here what about the problem I was writing before - and I'll write if with the new version it is OK now.
greetings
bronek
bronek
 

Postby Eric Clayberg » Wed Oct 13, 2004 4:58 am

bronek wrote:I just see nothing in stead of my form

This usually indicates a parse error of some sort. Can you send us source for the class that won't display? Any relevant entries in your Eclipse ".log" file would also be helpful.

bronek wrote:when I use borders (for example a titled border) on a panel where SpringLayout is - components on the panel behave very strange - when I try to move a component to a specicif place - it moves to another one

I could not reproduce this. I added titled borders to various widgets in a SpringLayout and then moved them around. They went exactly where I wanted them to go. Again, it would be useful to see an example class that illustrates this behavior (and possibly some screen shots, if that would help describe what you are seeing). Are you using widget-to-widget constraints or positioning everything relative to the parent container? Are you using or suppressing the dynamic snap points provided by Designer's SpringLayout graphical feedback?
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

Next

Return to Swing Designer

Who is online

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