Where is the database connection?
First things first:
You need to do proper coding:
GET AN IDE!
I can't stress that enough. This is 21. century, not 60s.
Eclipse is free and common used. there is no need to code in some notepad.
https://www.eclipse.org/downloads/[
^]
Now let's take a look at the coding:
public class Stext {
private JPanel panel = new JPanel();
private Integer indexer = 1;
private List<jlabel> listOfLabels = new ArrayList<jlabel>();
private List<jtextfield> listOfTextFields = new ArrayList<jtextfield>();
public Stext()
{
this.init();
{
public static void main(String[] args)
{
Stext stext = new Stext();
}
private void init()
{
{
private class ButtonListener implements ActionListener
{
}
</jtextfield></jtextfield></jlabel></jlabel>
Please read here for understanding OOP:
http://docs.oracle.com/javase/tutorial/java/javaOO/index.html[
^]
Now to your problem:
You have a
List<textfield></textfield>
in that GUI.
The
JTextField
is holding the entered text. So to get & work with that
String
, you should consider to create a variable for each value. As given in your coding a
List<string></string>
could be fine. Please also consider to use a
HashMap
instead of
List
as that gives you key-values for the
String
values.