VE with Swing problem [message #106001] |
Thu, 08 September 2005 20:54  |
Eclipse User |
|
|
|
Originally posted by: vasco.cs.cmu.edu
Hi,
I have installed VE for Eclipse 3.1 and after all the initial excitment
I am getting the feeling that it works MUCH better with SWF than Swing.
When I try to create a gui in Swing I have trouble resizing components or
containers as well as move the components to the desired location. When
using SWT this seems to work better. Does VE have issues dealing with
Swing? I need to know if the learning curve will be steep and if I should
stick to using the code editor when building swing GUI.
thanks,
Vasco
|
|
|
|
Re: VE with Swing problem [message #106046 is a reply to message #106001] |
Fri, 09 September 2005 06:07  |
Eclipse User |
|
|
|
Hi Vasco,
> When I try to create a gui in Swing I have trouble resizing
> components or containers as well as move the components to the desired
> location. When using SWT this seems to work better. Does VE have issues
> dealing with Swing?
What layout manager are you using ? In Swing resize only really works
if there is no layout manager in which case absolute position of the
Components is possible (using calls to setBounds(...)/setSize(..) and
setLocation(...) so the user experience with null is always better.
With anything else however the position of the child Components is
determined by the parent. If you are in FlowLayout for example (which
is the usual Swing default for JPanel) it makes everything be its
preferred size. A lot of serious Swing developers use GridBagLayout
which is probably the most powerful but tricky to learn at first.
For more information look at the help contents section called "Laying
out UI components using the visual editor".
> I need to know if the learning curve will be steep
> and if I should stick to using the code editor when building swing GUI.
In the code editor what layout manager are you using ? The purpose of
the VE is to beat the experience using code, especially when it comes to
complex layouts so if you don't like it we've failed, so we'll do all we
can to understand why we failed.
On another note, we are working on a few things to help simplify the
whole issue of layout manager selection and defaulting to try to make
the user experience easier to change the default one used, override this
simply, and also switch layout managers without having to hunt and peck
on the property sheet.
Best regards,
Joe Winchester
|
|
|
Re: VE with Swing problem [message #610723 is a reply to message #106001] |
Thu, 08 September 2005 22:09  |
Eclipse User |
|
|
|
I have been building swing forms in VE and haven't had any problems. Are
you sure the layout manager is set ? It defaults to flow layout, which could
explain your positioning and sizing problems. Select the JPanel and look
in the properties view for layout. Change it to null layout from the drop
down and you should be able to do x,y positioning and resizing. When you
are done you can try switching to one of the grid layouts - it does some
nice autoconversion for you. Also, I find that turning on snap to grid can
help considerably. (This is available in the context menu after you place
a component, assuming you have the correct preferences set : under window->
preferences -> java -> visual editor make sure 'show grid when container
or it's children are selected' is on.
Hope this helps,
Dylan
> Hi,
>
> I have installed VE for Eclipse 3.1 and after all the initial
> excitment I am getting the feeling that it works MUCH better with SWF
> than Swing. When I try to create a gui in Swing I have trouble
> resizing components or containers as well as move the components to
> the desired location. When using SWT this seems to work better. Does
> VE have issues dealing with Swing? I need to know if the learning
> curve will be steep and if I should stick to using the code editor
> when building swing GUI.
>
> thanks,
>
> Vasco
>
|
|
|
Re: VE with Swing problem [message #610725 is a reply to message #106001] |
Fri, 09 September 2005 06:07  |
Eclipse User |
|
|
|
Hi Vasco,
> When I try to create a gui in Swing I have trouble resizing
> components or containers as well as move the components to the desired
> location. When using SWT this seems to work better. Does VE have issues
> dealing with Swing?
What layout manager are you using ? In Swing resize only really works
if there is no layout manager in which case absolute position of the
Components is possible (using calls to setBounds(...)/setSize(..) and
setLocation(...) so the user experience with null is always better.
With anything else however the position of the child Components is
determined by the parent. If you are in FlowLayout for example (which
is the usual Swing default for JPanel) it makes everything be its
preferred size. A lot of serious Swing developers use GridBagLayout
which is probably the most powerful but tricky to learn at first.
For more information look at the help contents section called "Laying
out UI components using the visual editor".
> I need to know if the learning curve will be steep
> and if I should stick to using the code editor when building swing GUI.
In the code editor what layout manager are you using ? The purpose of
the VE is to beat the experience using code, especially when it comes to
complex layouts so if you don't like it we've failed, so we'll do all we
can to understand why we failed.
On another note, we are working on a few things to help simplify the
whole issue of layout manager selection and defaulting to try to make
the user experience easier to change the default one used, override this
simply, and also switch layout managers without having to hunt and peck
on the property sheet.
Best regards,
Joe Winchester
|
|
|
Powered by
FUDForum. Page generated in 0.29055 seconds