public void update() {
if (viewfilm.getTfIDFILM().getText().isEmpty() || viewfilm.getTfNAMAFILM().getText().isEmpty() || viewfilm.getTfPRODUKSI().getText().isEmpty()
|| viewfilm.getTfTAHUNRILIS().getText().isEmpty() || viewfilm.getCbSTATUS().getSelectedIndex() == 0) {
JOptionPane.showMessageDialog(viewfilm, "Form Harap Diisi lengkap & Tidak Kosong.", "Kesalahan", JOptionPane.WARNING_MESSAGE);
} else {
Film film = new Film();
film.setId(Integer.parseInt(viewfilm.getTfIDFILM().getText().toUpperCase().trim()));
film.setNamaFilm(viewfilm.getTfNAMAFILM().getText().toUpperCase().trim());
film.setProduksi(viewfilm.getTfPRODUKSI().getText().toUpperCase().trim());
film.setTahunTerbit(viewfilm.getTfTAHUNRILIS().getText().toUpperCase().trim());
film.setStatusKembali(viewfilm.getCbSTATUS().getSelectedItem().toString());
try {
serviceFilm.updateFilm(film);
JOptionPane.showMessageDialog(viewfilm, "Data Film Berhasil Disunting.", "Tambah Data Berhasil", JOptionPane.INFORMATION_MESSAGE);
} catch (Exception e) {
JOptionPane.showMessageDialog(viewfilm, "Data Gagal Disunting, Terjadi Kesalahan Pada MySQL.", "Kesalahan", JOptionPane.WARNING_MESSAGE);