java – Passing text captured in a TextField to a Jtable with the help of a button

I'm doing a project from my school with only Jframes, I've made a clothing store use 3 Jframes, one with a different menu with men's products and another with the shopping cart, then in the Men's products, the user chooses the clothes that wants and has ComboBox where he chooses the color of the size and quantity and the data that the user chooses to send to some TexField that are in the Jframe cart, what I want is that the button that says "Add product to cart" takes the data that is already in the TextField and sends it to the Jtable sorted as is, do not use any ComboBox Database only and textfield with the .getSelectedItem () statement to pass them to the texfield of the jframe cart.
I hope you can help me through
jframe with the comboBox from which the selected data is sent to the TexField field of the jframe cart

This is the jframe basket where I want the button

java – How to filter with a jtable using a jTextField. Netbeans

I have tested and, sincerely, I have not found how to do it. I have this course, and I am trying to use the KeyReleased key for research, but I do not really understand what to do or why it does not work, I leave the code if someone else. one can help you. Below is the part where I try to watch.

Public class LocationCRUD implements ActionListener, KeyListener {

VariablesGlobal var = new VariablesGlobal ();
private int action = var.getTipoaccion ();
very public TableRowSorter;

LocationDAO locationCRUD = new LocationDAO ();
PanelLaboral_Location windowLocation = new PanelLaboral_Location ();

Public Rent CRUD (LocationDAO rentCRUD,
PanelLaboral_Location windowLocation) {
this.location CRUD = locationCRUD;
this.ventanaLocation = windowLocation;
this.ventanaUbicacion.BTNagregar.addActionListener (this);
this.ventanaUbicacion.BTNhab.addActionListener (this);
this.ventanaUbicacion.BTNdes.addActionListener (this);
this.ventanaUbicacion.TFbusqueda.addActionListener (this);
}

public void InitializeCrudUbi () {
FillTrueTable (windowLocation.TableUbi);

}

// Fill in the columns and data in the table.
empty public FillTablaTrue (JTable TablaUbi) {
DefaultTableModel modelT = new DefaultTableModel ();
Ubi.setModel table (modelT);
TableUbi.setDefaultEditor (Object.class, null);
modelT.addColumn ("ID");
T.addColumn model ("Location");
T.addColumn template ("Description.");
T.addColumn template ("State");

TableUbi.setAutoResizeMode (JTable.AUTO_RESIZE_ALL_COLUMNS);

Object[] column = new object[4];
int numRegistros = locationCRUD.listarTrue (). size ();

for (int i = 0; i <numRecords; i ++) {
column[0] = locationCRUD.listerTrue (). get (i) .getUbi_id ();
column[1] = locationCRUD.listerTrue (). get (i) .getUbi_name ();
column[2] = locationCRUD.listarTrue (). get (i) .getUbi_descripcion ();
String status = "Enabled";
column[3] = state;

T.addRow model (column);
}
}

public void FillTableFalse (JTable TableUbi) {
DefaultTableModel modelT = new DefaultTableModel ();
Ubi.setModel table (modelT);
TableUbi.setDefaultEditor (Object.class, null);
modelT.addColumn ("ID");
T.addColumn model ("Location");
T.addColumn template ("Description.");
T.addColumn template ("State");



Object[] column = new object[4];
int numRegistros = locationCRUD.listarFalse (). size ();

for (int i = 0; i <numRecords; i ++) {
column[0] = locationCRUD.listarFalse (). get (i) .getUbi_id ();
column[1] = locationCRUD.listarFalse (). get (i) .getUbi_name ();
column[2] = locationCRUD.listarFalse (). get (i) .getUbi_description ();
String status = "Disabled";
column[3] = state;

T.addRow model (column);
}
}

@Override
public void actionPerformed (ActionEvent e) {
if (e.getSource () == windowLocation.BTNadd) {// AGGREGATED BUTTON
VariablesGlobal var = new VariablesGlobal ();
var.setTipoaccion (1);
PanelLaboral_UbicationActions v = new PanelLaboral_LocationActions ();
Actions LocationCrudAcc = new LocationCrudAcc (v);
actions.InitizeCrudAccUbi ();
v.setVisible (true);
}
if (e.getSource () == windowLocation.BTNhab) {// BUTTON ON
FillTrueTable (windowLocation.TableUbi);
}
if (e.getSource () == windowLocation.BTNdes) {// BUTTON ON
FillFalseTable (windowUbicacion.TablaUbi);
}
}

@Override
public void keyTyped (KeyEvent e) {
throw the new UnsupportedOperationException ("Not supported yet"); // To change the body of the generated methods, choose Tools | models
}

@Override
public void keyPressed (KeyEvent e) {
throw the new UnsupportedOperationException ("Not supported yet"); // To change the body of the generated methods, choose Tools | models
}

@Override
public void keyReleased (KeyEvent e) {
if (e.getSource () == windowLocation.TFsearch) {

trs.setRowFilter (RowFilter.regexFilter (windowLocation.TFbusqueda.getText (), 1));

trs = new TableRowSorter (windowUbicacion.TablaUbi.getModel ());
windowLocation.TableUbi.setRowSorter (very);
}
}

}

java – how to change the color of a cell in a jTable?

I've studied how to do it, but the only thing I find in creating another class extending DefaultTableCellRenderer, but the problem I have is that I already have the code that creates the table, the question is whether I want the bottom of a cell specified by the table to have a gray background as it would be the case, or this must necessarily be done by creating a class that extends DefaultTableCellRenderer