/**
*Text generated by Simple GUI Extension for BlueJ
*Update by Jeff Borland
*
*
**/
import javax.swing.UIManager.LookAndFeelInfo;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import javax.swing.border.Border;
import java.awt.image.*;
import java.util.Scanner;
import javax.swing.*;
/**
*Description of project goes here
*Author
*
*
**/
public class HWJ9_Keys extends BorlandBase {
int squareX=200;
int squareY=300;
int squareSize=20;
Color squareColor=Color.white;
int squareSpeed=10;
//Constructor
public void initialize(){
setWidth(500);
setHeight(400);
setScreenLayout(null);
setBackgroundColor(new Color(192,66,0));
//adding components to contentPane panel
}
//If you would like something painted when program opens
public void paintScreen(Graphics g)
{
g=getTempG();
g.setColor(squareColor);
g.fillRect(squareX,squareY,squareSize,squareSize);
drawScreen();
}
//This is the method that will be called if a key is pressed
public void keyPressed(KeyEvent e)
{
//char theChar=e.getKeyChar();
//int theCode=e.getKeyCode();
}
//This is the method that will be called if a key is released
public void keyReleased(KeyEvent e)
{
//char theChar=e.getKeyChar();
//int theCode=e.getKeyCode();
}
//This is the method that will be called if a key is typed
public void keyTyped(KeyEvent e)
{
//char theChar=e.getKeyChar();
//int theCode=e.getKeyCode();
}
public static void main(String[] args){
try{ BorlandBase.main((BorlandBase)(new Object() { }.getClass().getEnclosingClass().newInstance())); }
catch (Exception e){e.printStackTrace();}
}
}