diff --git a/src/lecteur_pdf/Popup.java b/src/lecteur_pdf/Popup.java index c711fae..cb8ea95 100644 --- a/src/lecteur_pdf/Popup.java +++ b/src/lecteur_pdf/Popup.java @@ -28,10 +28,9 @@ public class Popup { * @return JOptionPane.YES_OPTION si oui est cliqué, JOptionPane.NO_OPTION si non est cliqué */ public static int OuiNonPopup(Component parent, String titre, String message) { - JOptionPane d = new JOptionPane(); String[] choix = {"Oui", "Non"}; - return d.showOptionDialog(parent, message, titre, JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, - null, choix, choix[0]); + return JOptionPane.showOptionDialog(parent, message, titre, JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, + null, choix, choix[0]); } /** diff --git a/src/lecteur_pdf/pdf/DocumentPdf.java b/src/lecteur_pdf/pdf/DocumentPdf.java index aed890c..32555dd 100644 --- a/src/lecteur_pdf/pdf/DocumentPdf.java +++ b/src/lecteur_pdf/pdf/DocumentPdf.java @@ -24,7 +24,7 @@ import java.io.IOException; public class DocumentPdf { /** TODO */ - private PDDocument document; + private final PDDocument document; /** TODO */ private PDFRenderer renderer;