[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.ve] Re: Editing Layouts
|
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.