Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Editing Layouts
Editing Layouts [message #145758] Wed, 18 March 2009 17:41 Go to next message
Eclipse UserFriend
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 #145797 is a reply to message #145758] Wed, 18 March 2009 18:50 Go to previous messageGo to next message
Eclipse UserFriend
> 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 #145807 is a reply to message #145797] Thu, 19 March 2009 05:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: matthew.leah.pdgm.nospam.com

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 #145814 is a reply to message #145807] Thu, 19 March 2009 09:57 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
> 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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Broken GUI Editor after adding field to frame.
Next Topic:Broken GUI Editor after adding field to frame.
Goto Forum:
  


Current Time: Sat May 10 15:12:30 EDT 2025

Powered by FUDForum. Page generated in 0.04671 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top