forked from lucasmartiniano6/mc322-projeto
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow.java
More file actions
45 lines (34 loc) · 915 Bytes
/
Copy pathWindow.java
File metadata and controls
45 lines (34 loc) · 915 Bytes
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
import javax.swing.*;
import java.awt.Dimension;
import java.awt.Toolkit;
public abstract class Window {
private JFrame window;
private JPanel panel;
private final Tabuleiro tabuleiro;
public Window(Tabuleiro tabuleiro){
this.tabuleiro = tabuleiro;
gerarJanela();
makeBackground();
}
public abstract void makeBackground();
public abstract void gerarJanela();
public void setWindow(JFrame window) {
this.window = window;
}
public JFrame getWindow(){
return window;
}
public JPanel getPanel() {
return panel;
}
public void setPanel(JPanel panel) {
this.panel = panel;
}
public Dimension getResolucao(){
Toolkit tool = Toolkit.getDefaultToolkit();
return tool.getScreenSize();
}
public Tabuleiro getTabuleiro() {
return tabuleiro;
}
}