Ok, I'm trying to add the World Wind globe from NASA to a GUI window created by NetBeans GUI builder. My sample code instantiates its own window, and the GUI builder would like me not to edit the areas necessary to slip this in :) I'd write my own but this is part of a NetBeans platform app and contains code and annotations Im not prepared to handle yet. I am not sure how to accomplish this. Here is the sample code I would like in the window:
public class WorldWindTest {
public static void main(String[] args) {
//create a WorldWind main object
WorldWindowGLCanvas worldWindCanvas = new WorldWindowGLCanvas();
worldWindCanvas.setModel(new BasicModel());
Position myPoint = Position.fromDegrees(31.12, -88.64, 35000);
//build Java swing interface
JFrame frame = new JFrame("World Wind");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(worldWindCanvas);
frame.setSize(800,600);
frame.setVisible(true);
//create some "Position" to build a polyline
LinkedList<Position> list = new LinkedList<Position>();
// list.add(Position.fromDegrees(i,0.0,i*20000));
}
list.add(Position.fromDegrees(30.12, -85.64, 35000));
list.add(Position.fromDegrees(31.12, -88.64, 35000));
//create "Polyline" with list of "Position" and set color / thickness
Polyline polyline = new Polyline(list);
polyline.setColor(Color.RED);
polyline.setLineWidth(3.0);
//create a layer and add Polyline
RenderableLayer layer = new RenderableLayer();
layer.addRenderable(polyline);
//add layer to WorldWind
worldWindCanvas.getModel().getLayers().add(layer);
}
}