SYSC 2004 Lecture 3: TicTacToeFrame

75 views1 pages

Document Summary

Import java. util. import java. awt. import java. awt. event. import javax. swing. * a class modelling a tic-tac-toe (noughts and crosses, xs and os) game in a very. * @version november 8, 2012 public class tictactoeframe extends tictactoe private jtextarea status; // text area to print game status. * constructs a new tic-tac-toe board and sets up the basic. * jframe containing a jtextarea in a jscrollpane gui. public tictactoeframe() super(); Container contentpane = frame. getcontentpane(); frame. setdefaultcloseoperation(jframe. exit_on_close); frame. setbounds(300,50,500,300); status = new jtextarea(25,20); status. seteditable(false); status. setfont(new font(arial, font. plain, 20)); Jscrollpane scrollpane = new jscrollpane(status); contentpane. add(scrollpane,borderlayout. center); frame. pack(); frame. setvisible(true);

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents