I have two fields and a Jbutton.
I'd like to get the text from the fields (after button is pressed) and put them in an array list of objects.
myList.add(new Object(Field1, field2)); (This line already tested and works)
in my mouseReleased method I
test to see if the button is pressed:
JButton b = (JButton)event.getSource();
if (b == Accept)
{String name = field1.getText();
String num = field2.getText();
myList.add(new Object(field1, field2));
}
I'm obviously not getting the right results.
Need some help with this, thanks.