I have developed a MySQL database with 3 different columns. Among three columns, I used 2 columns to develop a network using JUNG. Now if I place a mouse over the vertex, the corresponding information from the third column should be displayed. I have tried with the following code with the help of setVertexToolTipTransformer. But nothing is displayed as an answer.
vv.setVertexToolTipTransformer(new Transformer<String, String>() {
public String transform(String v) {
try {
String bb = "SELECT * FROM interr'";
Statement pest = connection.createStatement();
ResultSet v1 = pest.executeQuery(bb);
while(v1.next())
v= v1.getString("Pubchem_ID");
return "PUBMED:"+v.toString();
}
catch (Exception e1) {
JOptionPane.showMessageDialog(null, e1);
}
return null;
}
});
Where should i edit my code? Can anyone pls help me with this?