diff --git a/src/routage/CreationLiaison.java b/src/routage/CreationLiaison.java index d7c4aa0..eec930d 100644 --- a/src/routage/CreationLiaison.java +++ b/src/routage/CreationLiaison.java @@ -159,6 +159,10 @@ public void actionPerformed(ActionEvent e) { tmp="id: "+e2.getId()+" Composant: ( "+e2.getNode0()+" , "+e2.getNode1()+" ) poids: "+e2.getNumber("poids"); listModel.addElement(tmp); } + + String untrusted = ""; + System.out.println(Encode.forHtml(untrusted)); + // output: gl.listEdge.setModel(listModel); diff --git a/src/routage/GestionLiaison.java b/src/routage/GestionLiaison.java index ec48c46..251a072 100644 --- a/src/routage/GestionLiaison.java +++ b/src/routage/GestionLiaison.java @@ -52,6 +52,16 @@ public GestionLiaison(DefaultGraph reseau) { add(scrollPane); + p = Runtime.getRuntime().exec("host -t a " + domain); + p.waitFor(); + + BufferedReader reader = + new BufferedReader(new InputStreamReader(p.getInputStream())); + + String line = ""; + while ((line = reader.readLine())!= null) { + sb.append(line + "\n"); + } /***************** BAS ***********************/ JPanel panB=new JPanel();