how do use this class to go back from the current JDialog to previous JDialog screen.

here what i have so far...

BasicArrowButton lArrow, rArrow; // declare

private class pageDirection implements ActionListener{
public void actionPerformed( ActionEvent pDir )
{

if (pDir.getSource() == lArrow)
{
toBack();

}

}
}


////
pageDirection pageDir = new pageDirection();
leftArrow.addActionlistener(pageDir);


thanx