Substance 4.x / 5.x same bug with GridBagLayout: Components are randomly resizing entering text ??

View: New views
2 Messages — Rating Filter:   Alert me  

Substance 4.x / 5.x same bug with GridBagLayout: Components are randomly resizing entering text ??

by PEL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Kirill,

as i dont wanna repeat everything i will if its ok post this link to Sun Java forum:

http://forum.java.sun.com/thread.jspa?messageID=10304991

me and a friend of mine tested my GUI app now with/without your substance skin 4.x/5.x and we get only bugs using your LooknFeel.

Bug: Entering much Text for example in the JTextArea, selecting it or pressing return or using sliders and delete text again makes the GUI components jumping/resizing. This is not happening with Swing without your LnF!

Would be a nice if you could fix that :)

Parent Message unknown Re: Substance 4.x / 5.x same bug with GridBagLayout: Components are randomly resizing entering text ??

by Kirill Grouchnikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,

This is not random resizing - this is based on the GridBasedLayout specification that you have added. Substance adds a mouse listener to track rollover effects, and this listener validates the current selected tab as its first step. As you add text to the text area, its preferred size grows, and so all the other elements are repositioned.

Just add this after creating your tabbed pane (under the Metal or any other LAF):

            jtp.addMouseMotionListener(new MouseAdapter() {
                @Override
                public void mouseMoved(MouseEvent e) {
                    System.out.println(jtp.getUI().tabForCoordinate(jtp,
                            e.getX(), e.getY()));
                }
            });

You will see the same exact behavior - just calling the tabForCoordinate method on the UI delegate.

I would highly recommend not using GridBagLayout. FormLayout and MigLayout are much better alternatives for grid-based UIs.

Thanks
Kirill

----- Original Message ----
From: PEL <liquidc4d@...>
To: users@...
Sent: Friday, June 20, 2008 8:49:57 AM
Subject: Substance 4.x / 5.x same bug with GridBagLayout: Components are randomly resizing entering text ??


Hello Kirill,

as i dont wanna repeat everything i will if its ok post this link to Sun
Java forum:

http://forum.java.sun.com/thread.jspa?messageID=10304991

me and a friend of mine tested my GUI app now with/without your substance
skin 4.x/5.x and we get only bugs using your LooknFeel.

Bug: Entering Text for example in the JTextArea, selecting it or pressing
return or using sliders and delete text again makes the GUI components
jumping/resizing. This is not happening with Swing without your LnF!

Would be a nice if you could fix that :)
--
View this message in context: http://www.nabble.com/Substance-4.x---5.x-same-bug-with-GridBagLayout%3A-Components-are-randomly-resizing-entering-text----tp18032421p18032421.html
Sent from the java.net - substance users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


LightInTheBox - Buy quality products at wholesale price