Changing the displayed tabbed pane using a JButton
From: But I Haven't Eaten Any Sweetcorn! (paul.x.lee_at_baesystems.com)
Date: 02/23/04
- Previous message: Ryan Stewart: "Re: Grpahics problem in j2sdk1.4.1_04"
- Next in thread: xarax: "Re: Changing the displayed tabbed pane using a JButton"
- Reply: xarax: "Re: Changing the displayed tabbed pane using a JButton"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 23 Feb 2004 13:25:18 -0000
Hi all,
I'm trying to include a button on a tabbed page that will enable you to
switch to
another page.
I'm using the following code:
FlyProGen.addActionListener( new ActionListener()
{
public void actionPerformed( ActionEvent e )
{
tabbedpane.setSelectedComponent( container ); // container is the page I
want to
// display rather than the top level page.
}
} );
However, I get the following error: "Cannot refer to a non-final variable
tabbed pane inside
an inner class defined in a different method".
Help!
best wishes
Paul
--
http://www.paullee.com
- Previous message: Ryan Stewart: "Re: Grpahics problem in j2sdk1.4.1_04"
- Next in thread: xarax: "Re: Changing the displayed tabbed pane using a JButton"
- Reply: xarax: "Re: Changing the displayed tabbed pane using a JButton"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]