package mouse;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;



//https://www.daniweb.com/software-development/java/threads/285593/drawing-a-line-on-a-canvas

public class paint extends JFrame{
	
	
	public paint() {
        UI();
    }


	
	public void UI()
	{
		   JPanel panel = new JPanel();
	       getContentPane().add(panel);

	       panel.setLayout(null);

	       JButton quitButton = new JButton("Quit");
	       quitButton.setBounds(50, 60, 80, 30);
	       quitButton.addActionListener(new ActionListener() {
	           public void actionPerformed(ActionEvent event) {
	               System.exit(0);
	          }
	       });

	       quitButton.setToolTipText("A button component");
	       
	       panel.add(quitButton);

	       setTitle("Quit button");
	       setSize(300, 200);
	       setLocationRelativeTo(null);
	       setDefaultCloseOperation(EXIT_ON_CLOSE);
	       
	       quitButton.addActionListener(this);


	}
	
	
	/*µpublic paint() {
	       setTitle("Simple example");
	       setSize(300, 200);
	       setLocationRelativeTo(null);
	       setDefaultCloseOperation(EXIT_ON_CLOSE);
	    }*/

	    public static void main(String[] args) {
	       paint ex = new paint();
	       ex.setVisible(true);
	    }


}