Ok, I'm trying to add the World Wind globe from NASA to the GUI window created by NetBeans GUI developer. My sample code creates its own window, and the GUI developer would like me not to edit the areas necessary to scroll it :) I would write my own, but this is part of the NetBeans platform application and contains code and annotations I'm not prepared for processing yet. I am not sure how to do this. Here is an example of the code I would like in a window:
public class WorldWindTest {
public static void main(String[] args) {
WorldWindowGLCanvas worldWindCanvas = new WorldWindowGLCanvas();
worldWindCanvas.setModel(new BasicModel());
Position myPoint = Position.fromDegrees(31.12, -88.64, 35000);
JFrame frame = new JFrame("World Wind");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(worldWindCanvas);
frame.setSize(800,600);
frame.setVisible(true);
LinkedList<Position> list = new LinkedList<Position>();
}
list.add(Position.fromDegrees(30.12, -85.64, 35000));
list.add(Position.fromDegrees(31.12, -88.64, 35000));
Polyline polyline = new Polyline(list);
polyline.setColor(Color.RED);
polyline.setLineWidth(3.0);
RenderableLayer layer = new RenderableLayer();
layer.addRenderable(polyline);
worldWindCanvas.getModel().getLayers().add(layer);
}
}
source
share