Class DrawingPanel
java.lang.Object
DrawingPanel
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener
public class DrawingPanel
- extends java.lang.Object
- implements java.awt.event.ActionListener
|
Constructor Summary |
DrawingPanel(int width,
int height)
|
DrawingPanel(int width,
int height,
java.lang.String panelTitle)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DrawingPanel
public DrawingPanel(int width,
int height)
DrawingPanel
public DrawingPanel(int width,
int height,
java.lang.String panelTitle)
addKeyListener
public void addKeyListener(java.awt.event.KeyListener listener)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
getGraphics
public java.awt.Graphics2D getGraphics()
setBackground
public void setBackground(java.awt.Color c)
setVisible
public void setVisible(boolean visible)
sleep
public void sleep(int millis)
close
public void close()
toFront
public void toFront()
getWidth
public int getWidth()
getHeight
public int getHeight()
getMouseX
public int getMouseX()
getMouseY
public int getMouseY()
getClickX
public int getClickX()
getClickY
public int getClickY()
mousePressed
public boolean mousePressed()