Add JGoPort under JGoEllipse

I have question about add JGoPort inside JGoEllipse.
My job is to create Node which is similar like JGoBasicNode. I need to show Icon inside ellipse and label under ellipse. The problem is there is no way in JGoBasicNode control the size of Ellipse (such as make Ellipse 45,45) so that drawing of Icon is not look good.
So I create Mynode base on JGoEllipse, I added JGoPort inside JGoEllipse. But when I put my node into the view, I can not make link. It seems JGoPort is not set current.
Please advise me how to do this. I think I have a lot of mistake
Here is my code
public class MyNode extends JGoEllipse {
Color cc =;
Image im = null;
boolean filledColor = false;
public GeneralNodePort port = new GeneralNodePort();
public MyNode() {
Point loc = this.getLocation();
port.setSpotLocation(JGoObject.Center,loc.x, loc.y);

public void setColor(Color newColor) {
cc = newColor;
public void setIcon(Image im) { = im;
public void paint(java.awt.Graphics2D g,JGoView view) {
super.paint(g, view);
Point loc = this.getLocation();
g.drawImage(im,loc.x + 7 ,loc.y + 7,null);

A JGoEllipse is just a simple JGoObject–it cannot have any child objects such as a JGoPort, a JGoImage, or a JGoText. You need to inherit from JGoArea. There are some examples of this in the kit.
But since you are defining a “node” class, using JGoPorts, you should extend JGoNode instead. There are examples of this in the kit. Plus you can look at the definitions of all of the predefined node classes too, in the source code for the JGo library.
But I don’t see why you are not extending JGoBasicNode. Is there any reason you can’t set the Size of the JGoBasicNode.getDrawable() object?
Did you try adding a JGoImage to the JGoBasicNode? If you want it to overlap with another child object of the JGoBasicNode, you may need to make sure it has the right Z-order position in the JGoArea’s list of child objects. Use JGoArea.insertObjectBefore or JGoArea.insertObjectAfter.
If anything changes size, you may need to adjust the size and/or position of your JGoImage (or of any other JGoObjects that you add to the node). You can do that in an override of layoutChildren. Just call the super method and then set the JGoImage’s bounding rectangle the way you want.

Hi Walter;
I did see the code of I put my JGoEllipse into via
node.initialize(new Point(200,200), new Dimension(45,45),nodeIcon,
null, title,0,0);
I do not want to show port on the left and right side. I want create JGoPort at center of GeneralNode so that user can draw and draw line. It is basic same function I want from JGoBasicNode but I can control the size of icon.
Do you have any example that show you can add JGoPort at center of area?

The AutoLinkNode example class provides a good example of that.