Original Post
Ok, this is something that's been bothering me for awhile now. I'm trying to use swing to make a hardware store program. I'm using swing and i got a GUI all designed with multiple forms and everything but I can't seem to connect them together....Like I had a button that says "add item", clicking on it brings up the frame to add a new item but when it's filled it doesn't do crap......the code is too long to post in thread so i'm going to upload everything into a zip file and just tell you where to look. The problem seems to be in:
(the newM if statement works).
either the problem is in the AddItem's actionHandler or something on my part......I don't know.
@Override
public void actionPerformed(ActionEvent arg0)
{
if(arg0.getSource() == this.OpenMI)
{
try
{
this.fileLoaded = this.LoadFile();
if(fileLoaded)
{
this.printData();
this.addDataToList();
}
}
catch(IOException e)
{
}
}
if(arg0.getSource() == this.newItemB)
{
AddItem newItem = new AddItem();
newItem.setVisible(true);
stock = new HardwareStock(40);
newItem.setStore(this);
this.HardwareDataTA.setText(stock.elementAt(1).toString());
}
}
}
(the newM if statement works).
either the problem is in the AddItem's actionHandler or something on my part......I don't know.