09.09.2013 Views

Kunstig Intelligens til Brætspillet Taiji - Danmarks Tekniske Universitet

Kunstig Intelligens til Brætspillet Taiji - Danmarks Tekniske Universitet

Kunstig Intelligens til Brætspillet Taiji - Danmarks Tekniske Universitet

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

226 Bilag A<br />

30<br />

31 tFrame = frame ;<br />

32<br />

33 JLabel q u e s t i o n = new JLabel (” S h a l l we play a game ?”) ;<br />

34 JLabel f i r s t F i l l e r = new JLabel ( ) ;<br />

35 JLabel s e c o n d F i l l e r = new JLabel ( ) ;<br />

36 JLabel t h i r d F i l l e r = new JLabel ( ) ;<br />

37 JLabel f o u r t h F i l l e r = new JLabel ( ) ;<br />

38 JLabel f i f t h F i l l e r = new JLabel ( ) ;<br />

39 JLabel s i x t h F i l l e r = new JLabel ( ) ;<br />

40<br />

41 t h i s . getContentPane ( ) . setLayout ( new BorderLayout ( ) ) ;<br />

42 t h i s . getContentPane ( ) . add ( mainPanel , ” Center ”) ;<br />

43<br />

44 mainPanel . setLayout ( new GridLayout ( 8 , 2 , 1 0 , 0 ) ) ;<br />

45 mainPanel . add ( q u e s t i o n ) ;<br />

46 mainPanel . add ( oneButton ) ;<br />

47 mainPanel . add ( f i r s t F i l l e r ) ;<br />

48 mainPanel . add ( twoButton ) ;<br />

49 mainPanel . add ( s e c o n d F i l l e r ) ;<br />

50 mainPanel . add ( threeButton ) ;<br />

51 mainPanel . add ( t h i r d F i l l e r ) ;<br />

52 mainPanel . add ( fourButton ) ;<br />

53 mainPanel . add ( f o u r t h F i l l e r ) ;<br />

54 mainPanel . add ( f i v e B u t t o n ) ;<br />

55 mainPanel . add ( f i f t h F i l l e r ) ;<br />

56 mainPanel . add ( sixButton ) ;<br />

57 mainPanel . add ( s i x t h F i l l e r ) ;<br />

58 mainPanel . add ( sevenButton ) ;<br />

59 mainPanel . add ( okButton ) ;<br />

60 mainPanel . add ( cancelButton ) ;<br />

61<br />

62 group . add ( oneButton ) ;<br />

63 group . add ( twoButton ) ;<br />

64 group . add ( threeButton ) ;<br />

65 group . add ( fourButton ) ;<br />

66 group . add ( f i v e B u t t o n ) ;<br />

67 group . add ( sixButton ) ;<br />

68 group . add ( sevenButton ) ;<br />

69 oneButton . setActionCommand ( ” 1 ” ) ;<br />

70 twoButton . setActionCommand ( ” 2 ” ) ;<br />

71 threeButton . setActionCommand ( ” 3 ” ) ;<br />

72 fourButton . setActionCommand ( ” 4 ” ) ;<br />

73 f i v e B u t t o n . setActionCommand ( ” 5 ” ) ;<br />

74 sixButton . setActionCommand ( ” 6 ” ) ;<br />

75 sevenButton . setActionCommand ( ” 7 ” ) ;<br />

76 oneButton . s e t S e l e c t e d ( t r u e ) ;<br />

77 twoButton . s e t S e l e c t e d ( f a l s e ) ;<br />

78 threeButton . s e t S e l e c t e d ( f a l s e ) ;<br />

79 fourButton . s e t S e l e c t e d ( f a l s e ) ;<br />

80 f i v e B u t t o n . s e t S e l e c t e d ( f a l s e ) ;<br />

81 sixButton . s e t S e l e c t e d ( f a l s e ) ;<br />

82 sevenButton . s e t S e l e c t e d ( f a l s e ) ;<br />

83<br />

84 S e t t i n g s L i s t e n e r BLis = new S e t t i n g s L i s t e n e r ( ) ;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!