The code I have currently works but only displays the table. I'm trying to add a text field below it but I'm not sure how I would do it. I'm also trying to set a listener on the text field and I'm not too sure how to do that either. Sorry if this is a dumb question, I'm not experienced in Java forms
public class table extends JFrame {
    JTable TestDB;
    public table(){
        setLayout(new FlowLayout());
        String[] columnNames={"First Name","Last Name","Address"};
        Object[][] data={{"Bob","Hazel","HelpMeDr"},{"Yo","Whattup","ezpz"}};
        TestDB=new JTable(data,columnNames);
        TestDB.setPreferredScrollableViewportSize(new Dimension(500,50));
        TestDB.setFillsViewportHeight(true);
        JScrollPane scrollPane=new JScrollPane(TestDB);
        add(scrollPane);
    }
}
 
     
    