import javax.swing.JFrame; 
import java.awt.Container;

public class One {
  public static void main(String[] args) {
    JFrame a = new JFrame();  
    Container c = a.getContentPane(); 
    c.add(new Scherm("How are you guys doing today?")); 
    a.setVisible(true); 
    a.setSize(400, 400); 
  }
}

--

import javax.swing.JComponent; 
import java.awt.Graphics; 

public class Scherm extends JComponent {
  String message; 
  public Scherm(String message) {
    this.message = message; 
  }
  public void paintComponent(Graphics g) {
    g.drawString(message, 100, 100);  
  }
}

--

I add the listening features:

import javax.swing.JFrame; 
import java.awt.Container;

public class One {
  public static void main(String[] args) {
    JFrame a = new JFrame();  
    Container c = a.getContentPane(); 
    c.add(new Scherm("How are you guys doing today?")); 
    a.setVisible(true); 
    a.setSize(400, 400); 
  }
}

--

import javax.swing.JComponent; 
import java.awt.Graphics; 

public class Scherm extends JComponent {
  String message; 
  public Scherm(String message) {
    this.message = message; 
    this.addMouseMotionListener( new Luisteraar() ); 
  }
  public void paintComponent(Graphics g) {
    g.drawString(message, 100, 100);  
  }
}

--

import java.awt.event.MouseMotionListener; 
import java.awt.event.MouseEvent; 

public class Luisteraar implements MouseMotionListener {
  public void mouseMoved(MouseEvent e) { 
    System.out.println("The mouse is being moved..."); 
  }   
  public void mouseDragged(MouseEvent e) {
    int x = e.getX(); 
    int y = e.getY(); 
    System.out.println("Mouse dragged at (" + x + ", " + y + ")"); 
  }   
}

--

import javax.swing.JFrame; 
import java.awt.Container;
import java.awt.event.KeyListener; 
import java.awt.event.KeyEvent; 

public class One extends JFrame implements KeyListener  {
  public void keyPressed(KeyEvent e) { 
    System.out.println( "Key pressed: " + e );
  } 
  public void keyReleased(KeyEvent e) { 
    System.out.println( "Key released: " + e );
  } 
  public void keyTyped(KeyEvent e) { 
    System.out.println( "Key typed: " + e );
  } 
  public One() {
    Container c = this.getContentPane(); 
    c.add(new Scherm("How are you guys doing today?")); 
    this.setVisible(true); 
    this.setSize(400, 400); 
    this.addKeyListener( this ); 
  }
  public static void main(String[] args) {
    One a = new One(); 
  }
}

--

import java.awt.event.MouseMotionListener; 
import java.awt.event.MouseEvent; 

public class Luisteraar implements MouseMotionListener {
  public void mouseMoved(MouseEvent e) { 
    System.out.println("The mouse is being moved..."); 
  }   
  public void mouseDragged(MouseEvent e) {
    int x = e.getX(); 
    int y = e.getY(); 
    System.out.println("Mouse dragged at (" + x + ", " + y + ")"); 
  }   
}

--

import javax.swing.JComponent; 
import java.awt.Graphics; 
import java.awt.event.KeyListener; 
import java.awt.event.KeyEvent; 

public class Scherm extends JComponent implements KeyListener {
  public void keyPressed(KeyEvent e) { 
    System.out.println( e );
  } 
  public void keyReleased(KeyEvent e) { 
    System.out.println( e );
  } 
  public void keyTyped(KeyEvent e) { 
    System.out.println( e );
  } 
  String message; 
  public Scherm(String message) {
    this.message = message; 
    this.addMouseMotionListener( new Luisteraar() ); 
    this.addKeyListener( this ); 
  }
  public void paintComponent(Graphics g) {
    g.drawString(message, 100, 100);  
  }
}

--

import javax.swing.JFrame;
import javax.swing.Timer;
import java.awt.event.ActionListener; 
import java.awt.event.ActionEvent; 

public class Three extends JFrame implements ActionListener {
  int count;
  public void actionPerformed(ActionEvent e) {
    System.out.println("Nothing... " + ++this.count);  
  }
  public Three() {
    this.setVisible(true); 
    this.setSize(400, 400); 
  }
  public static void main(String[] args) {
    Three three = new Three(); 
    Timer t = new Timer(200, three); 
    t.start(); 
  }
}

--

  Do you understand what options you have for the project? 

  What would you prefer to do as a project? 

  Would you like to develop a simple game engine and some games or web application? 

  For the exam tomorrow what is the problem that scares you the most: mention three, in order. 

Misato Daniel Ruiz Jillian Kefei Patrick Tao Rafael Iris Garrett Yibo Danny Khalea Justin
Keiland Noah Nicholas Daniel C John K Jiang Q Bihan S Stuart H Ryan C Elise J Taylor O'd

See you at 2:30pm. 

--