-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChessFrame.java
More file actions
36 lines (28 loc) · 905 Bytes
/
ChessFrame.java
File metadata and controls
36 lines (28 loc) · 905 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
/**
* Created by Evgeniy Gusar
*/
import javax.swing.*;
import java.awt.BorderLayout;
public class ChessFrame extends JFrame
{
ChessPanel chessP = new ChessPanel();
public ChessFrame()
{
this.setSize(335,358);/*@\label{setsize:line}@*/
this.setLocation(500,200);/*@\label{setloc:line}@*/
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);/*@\label{closeOp:line}@*/
this.getContentPane().add(chessP, BorderLayout.SOUTH);
/*ChessMouseListener cMouseAdpt = new ChessMouseListener();
chessP.addMouseMotionListener(cMouseAdpt);
chessP.addMouseListener(cMouseAdpt);*/
}
// Makes the frame visible.
public void showIt(){
this.setVisible(true);
}
// Makes the frame visible and sets the title text.
public void showIt(String title){
this.setTitle(title);
this.setVisible(true);
}
}