Esempio n. 1
0
  public UIUnidad(IUnidad interfaz) {
    initComponents();
    this.setVisible(true);
    this.setTitle("MANTENIMIENTO DE UNIDAD");
    setLocationRelativeTo(null);

    this.interfaz = interfaz;
    interfaz.cargar(tblRegistros);

    cellSelectionModel = tblRegistros.getSelectionModel();
    cellSelectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    cellSelectionModel.addListSelectionListener(
        new ListSelectionListener() {
          @Override
          public void valueChanged(ListSelectionEvent e) {
            interfaz.actualizarEst(tblRegistros, chActivar);
          }
        });
    interfaz.buscarUnidad(txtBuscar, tblRegistros);
  }