Editing Layouts [message #145758] |
Wed, 18 March 2009 17:41  |
Eclipse User |
|
|
|
Hi,
How do I set the active card in a CardLayout?
How do I set the grid row/column size in a GridBagLayout?
Thanks,
MB
|
|
|
|
|
Re: Editing Layouts [message #145814 is a reply to message #145807] |
Thu, 19 March 2009 09:57  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
If you want to switch between the cards while in the VE, just select the
card (or any component under that card) in the Beans viewer. It will
bring that card to the top.
--
Thanks,
Rich Kulp
|
|
|
Re: Editing Layouts [message #617337 is a reply to message #145758] |
Wed, 18 March 2009 18:50  |
Eclipse User |
|
|
|
> How do I set the active card in a CardLayout?
> How do I set the grid row/column size in a GridBagLayout?
I was able to set up the GridBagLayout using the constraints property in
the actual objects.
However, I still can't figure out how to set the active card in a
CardLayout.
Thanks,
MB
|
|
|
Re: Editing Layouts [message #617338 is a reply to message #145797] |
Thu, 19 March 2009 05:47  |
Eclipse User |
|
|
|
mnbv wrote:
>> How do I set the active card in a CardLayout?
>
>> How do I set the grid row/column size in a GridBagLayout?
>
> I was able to set up the GridBagLayout using the constraints property in
> the actual objects.
>
> However, I still can't figure out how to set the active card in a
> CardLayout.
>
> Thanks,
> MB
>
I don't think it is possible to explicitly set the active card using VE.
The default card displayed tends to be the panel first in the list.
It is very easy to do programmatically. You can use the CardLayout's
show() method to set a specific panel active.
CardLayout layout = (CardLayout)cardPanel.getLayout();
layout.show(cardPanel, "activePanel");
Alternatively, the next() and previous() methods can be used to navigate
through the sequence of panels in the card layout.
Hope that helps,
Matt.
|
|
|
Re: Editing Layouts [message #617339 is a reply to message #145807] |
Thu, 19 March 2009 09:57  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
If you want to switch between the cards while in the VE, just select the
card (or any component under that card) in the Beans viewer. It will
bring that card to the top.
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.04671 seconds