4041424344454647484950
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(850, 700); frame.setLayout(new FlowLayout()); //get map panel final MapPanel ui = initMap(); frame.add(ui); addButton(); //show frame
50515253545556575859606162
//show frame frame.setVisible(true); } private MapPanel initMap() { MapPanel ui = new MapPanel(800, 510); ui.setPreferredSize(new Dimension(800, 510)); map = ui.getMap(); addLayer(map); map.fullView(); map.refreshMap();
333435363738394041
this.setSize(850, 700); this.setLayout(new FlowLayout()); //get map panel final MapPanel ui = initMap(); this.add(ui); addButton(this,ui.getMap()); }
39404142434445464748495051
this.add(ui); addButton(this,ui.getMap()); } private MapPanel initMap() { MapPanel ui = new MapPanel(800, 510); ui.setPreferredSize(new Dimension(800, 510)); map = ui.getMap(); addLayer(map); map.fullView(); map.refreshMap();