this is my code..
class NewAction implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
TArea2.setDocument(new PlainDocument());
}
}
void confirmation()
{
int ReturnValue=JOptionPane.showConfirmDialog(null,"Do you want to open a new file? ","Confirmation ", JOptionPane.YES_NO_CANCEL_OPTION );
if(ReturnValue==JOptionPane.YES_OPTION)
{
//HOW CAN I POSSIBLY CALL THE METHOD IN THE NewAction class??
}
else if(ReturnValue==JOptionPane.CANCEL_OPTION)
{
}
}
sorry for my newbie question but can we actually call the actionPerformed method inside the NewAction class from the confirmation method??
i did try some like
this.NewAction().actionPerformed();
myclass.NewAction.actionPeformed();
NewAction().actionPerformed();
NewAction.actionPerformed();
i dont know any possibilities anymore..
help me please..
i changed the NewAction class become public but still doesnt work..
thanks