Add JGoPort to JGoSubGraph

Hallo!
I want to add 2 JGoPorts (in- and out-port) to a JGoSubGraph.
What is the right approach for that?

Thanks in advance!
Simon

Well, you can just add a couple of JGoPorts to the JGoSubGraph, and make sure layoutChildren positions them on the insides of the bounding rectangle.
Hmmm, getting the bounds right is a little tricky with the current design of JGoSubGraph, so I have implemented this for you and uploaded it to:
http://www.nwoods.com/forum/uploads/TestSubGraph.java
The trickiness involves making sure the two ports aren’t involved in the computeBoundingRect() and layoutLabel() methods.
I have also optimized the behavior some by making use of the Initializing property, to avoid unnecessary computation in layoutChildren.
Some day (sorry, not in 5.1) we’ll make some improvement to JGoSubGraph so these kinds of customizations are a lot easier.

Thank you very much!
Your JGoSubGraph implementation with the 2 JGoPorts is great!