-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnalysisWindow.java
More file actions
63 lines (52 loc) · 1.5 KB
/
AnalysisWindow.java
File metadata and controls
63 lines (52 loc) · 1.5 KB
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
56
57
58
59
60
61
62
63
package ImageAnalysisLibrary;
import java.awt.BorderLayout;
import java.awt.image.BufferedImage;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class AnalysisWindow extends JFrame{
private static final long serialVersionUID = 1L;
BufferedImage IMG;
public boolean isopen;
JLabel label;
SIPL_Window(){
this.isopen = true;
}
public SIPL_Window(BufferedImage img){
this.IMG = img;
//Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
label=new JLabel();
label = new JLabel((new ImageIcon(IMG)));
this.setLayout( new BorderLayout());
this.getContentPane().add(label,BorderLayout.CENTER);
//this.setLocationRelativeTo(null);
this.setSize(IMG.getWidth()+100, IMG.getHeight()+100);
this.setVisible(true);
this.isopen = true;
}
public void start_window() {
label=new JLabel();
this.setSize(300, 300);
this.setVisible(true);
this.setLayout(null);
}
public void Refresh_Frame(BufferedImage img) {
this.IMG = img;
label = new JLabel((new ImageIcon(IMG)));
this.setSize(IMG.getWidth()+100, IMG.getHeight()+100);
this.revalidate();
this.repaint();
//this.setVisible(true);
//this.setLayout(null);
}
public void Refresh_Frame(BufferedImage img,int width,int height) {
this.IMG = img;
label.setIcon((Icon) new ImageIcon(IMG));
this.setSize(width, height);
this.revalidate();
this.repaint();
//this.setVisible(true);
//this.setLayout(null);
}
}