-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDisplay.java
55 lines (42 loc) · 1.2 KB
/
Display.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import java.applet.Applet;
import java.awt.*;
import java.awt.Graphics;
import java.util.Map;
import java.applet.*;
import java.awt.*;
import java.net.*;
import java.io.IOException.*;
import java.util.*;
import java.io.File;
import java.io.*;
import java.io.IOException;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
/**
* Created by nayeemkamal on 11/11/17.
*/
public class Display extends Applet{
HashMap<Coordinate,Coordinate> coordMap = new HashMap<Coordinate,Coordinate>();
URL img;
try{
File f = new File("/Users/nayeemkamal/Desktop/telemetry/ScreenShot2017-11-09at1.55.55PM.png");
BufferedImage image = new BufferedImage(412,480,BufferedImage.TYPE_INT_ARGB);
image = ImageIO.read(f);
System.out.println("read")
}catch(IOException e){
}
{
try {
img = new URL("/Users/nayeemkamal/Desktop/telemetry/ScreenShot2017-11-09at1.55.55PM.png");
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
UIMap map = new UIMap(img,coordMap);
public void init(){
setSize(412,480);
}
public void paint(Graphics g){
g.drawImage(map.getImg(),0,0,this);
}
}