private void createData() {
   ForeignLanguage m = new ForeignLanguage();
   m.setForeignLanguageName(txtCountryName.getText());
   m.setForeignLanguageId(String.valueOf(Math.random() * 10));
   m.setCountryIdActual(country.getId());
   foreignLanguageBN.insert(m);
   resetData();
   loadData();
 }
  private void loadData() {

    list = foreignLanguageBN.selectLanguageByCountryId(country.getId());
    String[] header = {"Thông số"};
    model = new DefaultTableModel(header, 0);
    for (ForeignLanguage bean : list) {
      String[] rows = {bean.getForeignLanguageName()};
      model.addRow(rows);
    }
    tableObject.setModel(model);
  }
 private void editData() {
   foreignLanguage.setForeignLanguageName(txtCountryName.getText());
   foreignLanguageBN.update(foreignLanguage);
   resetData();
   loadData();
 }
 private void removeData() {
   foreignLanguageBN.delete(foreignLanguage.getId());
   model.removeRow(tableObject.getSelectedRow());
   resetData();
   loadData();
 }