I assume you are talking about interactive linking–you can never have any problems creating a link programmatically.
By default the user cannot draw a link from a port on a node to any port (including itself) on the same node. This is implemented by the JGoPort.validLink predicate, which checks the isValidSelfNode() property for both the “from” and the “to” port.
So you can either set that property to true for both ports, or you can override JGoPort.validLink or JGoPort.getParentNode, or you can use a JGoSubGraph instead of JGoArea.
Thanks
It works when I add --> “this.getPort().setValidSelfNode(true);” to the constructor of my node class .
But I didn’t get the logic . The interactive link worked between a node inside the area and a node directly on the view .why the interactive link didn’t work when both nodes were inside the area?? and what exactly is the effect of “setValidSelfNode” do in this case …