Walter the balloon worked great thanks, Now I am looking to create a JGoObject that is basically a JPanel that will render anything I put in the JPanel… is suggestions to get me started?
Use a JGoControl, which is a JGoObject that is is a placeholder for a JComponent that is a child of the JGoView. Search for more information about JGoControl, and look at the implementations of the classes that inherit from JGoControl.
public class JGoJPanel extends JGoControl {
private JPanel contentPanel;
/** Creates a new instance of JGoJPanel */
public JGoJPanel(JPanel contentPanel) {
this.contentPanel = contentPanel;
}
public JComponent createComponent(JGoView view) {
return this.contentPanel;
}
}
JPanel j = new JPanel();
j.add(new JLabel("Balloon Text));
JGoBalloon balloon = new JGoBalloon(j);
balloon.setLocation(foundationNode.getLocation().x-60,foundationNode.getLocation().y-60);
balloon.setAnchor(foundationNode);
document.addObject(balloon);
j.add(new JLabel("Balloon Text));
JGoBalloon balloon = new JGoBalloon(j);
balloon.setLocation(foundationNode.getLocation().x-60,foundationNode.getLocation().y-60);
balloon.setAnchor(foundationNode);
document.addObject(balloon);
You don't say what the problem is.
Did you add a balloon constructor to take a JPanel instead of a String, and it creates a JGoJPanel?
What is the size of the JGoJPanel? Did you set its Size to be the size of the JPanel?