public class Tracking extends JInternalFrame { private MapPanel map; private JLabel map1; public Tracking(String lan,String lat,String codeno){ super("Tracking :"+codeno+"-Location",false,true,false,true); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); setSize(700,500); map=new MapPanel(); map.setZoom(13); double lon = Double.valueOf(lan); double latt = Double.valueOf(lat); map1=new JLabel(new ImageIcon(ClassLoader.getSystemResource("Image/position.png"))); Point position = map.computePosition(new Point2D.Double(lon,latt)); map1.setLocation(position); map1.setFocusable(true); map.setIgnoreRepaint(true); map.setFocusable(true); map.setCenterPosition(position); // sets to the computed position add(map); map.add(map1); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)