I need to get the coordinates (x,y) of a mxCell that i find by his Id, but when i call getGeometry() on it, it gives me null and after i get NullPointerException.
private double getX(String node){
mxCell cell = (mxCell) ((mxGraphModel)map.getGraph().getModel()).getCell(node);
mxGeometry geo = cell.getGeometry();//this line give me the null value
double x = geo.getX();//NullPointerException
return x;
}
map is the mxGraphComponent that contains all the graph.
What am i missing?