Hi
I know that in card layout we can add different
cards and switch between them.
Now i have add buttons as first, last, next and previous. And i am able to do so by using this buttons.Now what i need is to get a card directly on clicking a button say xyz. Imagine you have 15
cards and you need to get the 7th card on clicking the xyz button how to do it. Please some body help me.
The code i used for first and last button is as follows for card layout with 4 cards.
This is for first button
firstb.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent arg0)
{
cl.first(panel);
currcard=1;
}
});
This is for last button
firstb.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent arg0)
{
cl.last(panel);
currcard=4;
}
});