import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class TestGameInfoDialog extends JFrame{
TestGameInfoDialog(){
super("対局情報ダイアログのテスト");
setBounds(50,50,300,200);
getContentPane().setLayout(null);
JButton button=new JButton("表示");
button.setBounds(100,50,100,30);
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
showProc();
}
});
getContentPane().add(button);
}
private void showProc(){
IgoInitModel model=new IgoInitModel();
GameInfoDialog dialog=new GameInfoDialog(this,"対局情報",true,model);
GameInformation gameInfo=new GameInformation();
gameInfo.setBlackPlayer("対局者名 黒");
gameInfo.setWhitePlayer("対局者名 白");
gameInfo.setBlackRank("段位 黒");
gameInfo.setWhiteRank("段位 白");
gameInfo.setEvent("大会名");
gameInfo.setGameName("対局名");
gameInfo.setDate("対局日");
gameInfo.setKomi("コミ");
gameInfo.setResult("結果");
dialog.showDialog(gameInfo);
}
public static void main(String[] args){
TestGameInfoDialog frame=new TestGameInfoDialog();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}