hello every body
this is part of my datastructure project//i used java lang.
i have a problem in using GUI,
see :
JButton button3 = new JButton("Sub Users Access: Students & Teachers");
button3.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
String Option2 = JOptionPane.showInputDialog(null, "\n1-Show list of bookes\n2-Search book\n3-Exit\n\nEnter a number of service", "Sub-Users Options", JOptionPane.INFORMATION_MESSAGE);
int ConvOption2 = Integer.parseInt(Option2);
theUser.SubUser(ConvOption2,Option2);//go to SubUser method
}//end method public void actionListener
});//end button3
Q1: is it right that i call SubUser method of class users by theUser object< inside a button method.>
//the code gave me no error & it is run but the task of the method not work
//no action & it just hanging when reach to any task
//i had already checked the method alone befor >>> its work .
Q2: i want to pass the variables inside a button( ConvOption2,Option2)
so is there any way to calling out the putton and can pass these variable?
//pleazzzzzzzzzzze if any one have an idea about this>>> i wait for a help
*** e.g.: when user chosse 2 to search about book>>>hang & nothing appear
thanks all.
All ideas are welcome.