hi,
I write one file with two buttons.Code for that is as fallow.
public void actionPerformed (ActionEvent e)
{
try
{
if(e.getSource( )==cancel)
{
frame.hide();
}
else if(e.getSource( )==create)
{
category[0] =(String)Oone.g etSelectedItem( );
category[1] =(String)Otwo.g etSelectedItem( );
category[2] =(String)Othree .getSelectedIte m();
category[3] =(String)Ofour. getSelectedItem ();
wv1=(String)w1. getSelectedItem ();
wv2=(String)w2. getSelectedItem ();
sv1=(String)s1. getSelectedItem ();
sv2=(String)s2. getSelectedItem ();
erav1=(String)e ra1.getSelected Item();
erav2=(String)e ra2.getSelected Item();
whipv1=(String) whip1.getSelect edItem();
whipv2=(String) whip2.getSelect edItem();
final Automatic automatic = new Automatic(categ ory[0],category[1],category[2],category[3],category[4],category[5],category[6],category[7]);
frame.setConten tPane(automatic );
frame.setVisibl e(true);
}
}catch(Exceptio n e1)
{
System.out.prin tln("hi..."+e1) ;
}
}
There is two Buttons 1.Create Team 2.Cancel
This both the buttons work at command prompt.but when I make the jar file of this whole project only cancel button works, another button Create Team doesn't perform any action.
I can't understand what is the reason behind this.
Thanks In advance.
Thanks,
Vikas Sawant.
I write one file with two buttons.Code for that is as fallow.
public void actionPerformed (ActionEvent e)
{
try
{
if(e.getSource( )==cancel)
{
frame.hide();
}
else if(e.getSource( )==create)
{
category[0] =(String)Oone.g etSelectedItem( );
category[1] =(String)Otwo.g etSelectedItem( );
category[2] =(String)Othree .getSelectedIte m();
category[3] =(String)Ofour. getSelectedItem ();
wv1=(String)w1. getSelectedItem ();
wv2=(String)w2. getSelectedItem ();
sv1=(String)s1. getSelectedItem ();
sv2=(String)s2. getSelectedItem ();
erav1=(String)e ra1.getSelected Item();
erav2=(String)e ra2.getSelected Item();
whipv1=(String) whip1.getSelect edItem();
whipv2=(String) whip2.getSelect edItem();
final Automatic automatic = new Automatic(categ ory[0],category[1],category[2],category[3],category[4],category[5],category[6],category[7]);
frame.setConten tPane(automatic );
frame.setVisibl e(true);
}
}catch(Exceptio n e1)
{
System.out.prin tln("hi..."+e1) ;
}
}
There is two Buttons 1.Create Team 2.Cancel
This both the buttons work at command prompt.but when I make the jar file of this whole project only cancel button works, another button Create Team doesn't perform any action.
I can't understand what is the reason behind this.
Thanks In advance.
Thanks,
Vikas Sawant.
Comment