This is my inner class that creates the graphic text. I want to be able to press an arrow key and have it disappear. I'm sure it involves the remove method somehow, but I'm in over my head. Very new at this.
// STARTUP TEXT
class TextPanel extends JPanel implements KeyListener{
// CONSTRUCTOR
public TextPanel(){
addKeyListener(this);
setFocusable(true);
setFocusTraversalKeysEnabled(false);
}
// PAINT METHOD
public void paintComponent(Graphics g2){
super.paintComponent(g2);
g2.setColor(Color.WHITE);
g2.fillRect(0, 0, this.getWidth(), this.getHeight());
g2.setColor(Color.BLACK);
g2.setFont(new Font("TimesRoman", Font.PLAIN, 14));
g2.drawString("Press an arrow key to start", this.getWidth()/4, this.getHeight()/2);
}