Курсовая работа: Java-гра Тетріс

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(153, 153, 153)

.addComponent(buttonPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(tetrisGamePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 485, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(buttonPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(tetrisGamePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 612, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void tetrisGamePanel1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tetrisGamePanel1KeyPressed

TetrisGamePanel p = (TetrisGamePanel)tetrisGamePanel1;

switch (evt.getKeyCode()) {

case KeyEvent.VK_LEFT:

p.figureMoveLeft();

break;

case KeyEvent.VK_RIGHT:

p.figureMoveRight();

К-во Просмотров: 1206
Бесплатно скачать Курсовая работа: Java-гра Тетріс