There is something like a DB. There is one JTextField line which is filled with data after pressing the corresponding button. How can I implement the filling of several colons of the type (int, String, String, int) in one line at the touch of a button? That is, somehow put something at the input.
JTextField txtCreate = new JTextField(); //CREATE txtCreate.setBounds(10, 350, 100, 20); String temp[] = textCreate.getText().replaceAll(" ", "").split(","); add(txtCreate); add(btnCreate); btnCreate.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { new Person(); dm.pd.create(new Person(new Person(Integer.valueOf(temp[0]), temp[1], temp[2], Integer.valueOf(temp[3]))); //HELP dm.pp = dm.pd.read(); tbl.revalidate(); } } );