1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| public Fenetre(AbstractControleur controleur) {
this.controleur=controleur;
this.setSize(1500,800);
this.setTitle("BookFace");
this.panelAcceuille=new JPanel();
this.panelAcceuille.setLayout(new BorderLayout());
try {
JEditorPane editeur=new JEditorPane(new URL("http://localhost/moteur/Connection/"));
editeur.setContentType("text/html");
editeur.setEditable(false);
editeur.getDocument().putProperty("IgnoreCharsetDirective", Boolean.TRUE);
this.panelAcceuille.add(editeur,BorderLayout.CENTER);
}catch(Exception e) {
JOptionPane alert=new JOptionPane("Erreur La Page Est Introuvable");
alert.showMessageDialog(this, "Erreur l'ors du chargemnt");
//e.printStackTrace();
}
this.setBackground(Color.white);
this.getContentPane().setLayout(new BorderLayout());
this.getContentPane().add(this.panelAcceuille,BorderLayout.CENTER);
this.setVisible(true);
} |
Partager