public static void delete(int id) throws SQLException { ProdutoVendidoDAO dao = new ProdutoVendidoDAO(); try { dao.delete(id); } catch (SQLException e) { JOptionPane.showMessageDialog(null, "Não foi possível excluir o registro\n" + e, "erro", 0); } }