import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class NaamVenster extends JFrame implements ActionListener
{
  
  private JButton toonNaam = new JButton("Toon naam");
  private JTextField txtNaam = new JTextField();
  private JTextField txtVoornaam = new JTextField();
  private JLabel lblVoornaam = new JLabel("Voornaam");
  private JLabel lblNaam = new JLabel("Naam");
  
  public static void main(String args[]) {
  	
  	NaamVenster naamvenster = new NaamVenster();
    naamvenster.setSize(300,300);
    naamvenster.createGUI();
    naamvenster.show();               	  	
  	
  }
  
  
  
  public void createGUI()
  {
    
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    Container c = getContentPane();
    c.setLayout(null);
  
    lblVoornaam.setBounds(10,10,100,30);
    c.add(lblVoornaam);    
     
    lblNaam.setBounds(10,50,100,30);
    c.add(lblNaam);
    
    txtVoornaam.addActionListener(this);
    txtVoornaam.setBounds(120,10,100,30);
    c.add(txtVoornaam);
    
    txtNaam.setBounds(120,50,100,30);
    txtNaam.addActionListener(this);
    c.add(txtNaam);
    
    toonNaam.setBounds(10,160,100,30);
    toonNaam.addActionListener(this);
    c.add(toonNaam); 
    
      
  }
  
  public void actionPerformed(ActionEvent e)
  {
    
    //als de gebruiker klikt op de button 
    //of op de enter-toets in het txtNaam tekstveld
    //dan tonen we de voornaam en naam in een dialoogvenster
    
   
    
    //als de gebruiker klikt op de enter-toets 
    //in het tekstveld txtVoornaam dan krijgt het
    //tekstveld txtNaam de focus
        
  
  }  
}

