public class MapDisposeApp {
private JFrame window;
private JMap map;
public MapDisposeApp() {
window = new JFrame();
window.setSize(800, 600);
window.setLocationRelativeTo(null); // center on screen
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.getContentPane().setLayout(new BorderLayout(0, 0));
window.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent windowEvent) {
super.windowClosing(windowEvent);
// map.dispose();
}
});
map = new JMap();
window.getContentPane().add(map);
// ArcGISTiledMapServiceLayer tiledLayer = new ArcGISTiledMapServiceLayer(
// "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
// map.getLayers().add(tiledLayer);
}
/**
* @param args
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
MapDisposeApp application = new MapDisposeApp();
application.window.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
}
Are you getting the spewing-offs mentioned on this thread?Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
Frame_buffer_OGL::init_ FAILED to create_ FramebufferName
...