import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.Canvas;
import java.awt.GraphicsEnvironment;
import java.awt.GraphicsDevice;
import java.awt.Rectangle;
import java.awt.Dimension;

public class Main extends Canvas {

    private int SCREEN_WIDTH;
    private int SCREEN_HEIGHT;

    private Main() {
        GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice device = env.getScreenDevices()[0];
        Rectangle SCREEN_RECTANGLE = device.getDefaultConfiguration().getBounds();
        SCREEN_WIDTH = SCREEN_RECTANGLE.width;
        SCREEN_HEIGHT = SCREEN_RECTANGLE.height;

        JFrame container = new JFrame("PipeFlowTool");
        JPanel panel = (JPanel) container.getContentPane();
        panel.setPreferredSize(new Dimension(SCREEN_WIDTH, SCREEN_HEIGHT));
        panel.setLayout(null);
        panel.add(this);

        setBounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
        //setLocation(0, 0);

        container.pack();
        container.setResizable(false);
        container.setVisible(true);
        requestFocus();
    }

	public static void main(String[] args) {
		new Main().run();
	}

	private void run() {
	}
}

@@ -193,16 +193,87 @@
 mension;
+%0Aimport java.awt.event.MouseEvent;%0Aimport java.awt.event.MouseListener;
 %0A%0Apublic
@@ -299,16 +299,41 @@
  Canvas 
+implements MouseListener 
 %7B%0A%0A    p
@@ -343,28 +343,27 @@
 ate int 
-SCREEN_WIDTH
+screenWidth
 ;%0A    pr
@@ -372,29 +372,28 @@
 ate int 
-SCREEN_HEIGHT
+screenHeight
 ;%0A%0A    p
@@ -570,32 +570,31 @@
 ctangle 
-SCREEN_RECTANGLE
+screenRectangle
  = devic
@@ -646,87 +646,83 @@
     
-SCREEN_WIDTH = SCREEN_RECTANGLE.width;%0A        SCREEN_HEIGHT = SCREEN_RECTANGLE
+screenWidth = screenRectangle.width;%0A        screenHeight = screenRectangle
 .hei
@@ -891,35 +891,33 @@
 ion(
-SCREEN_WIDTH, SCREEN_HEIGHT
+screenWidth, screenHeight
 ));%0A
@@ -1001,35 +1001,33 @@
  0, 
-SCREEN_WIDTH, SCREEN_HEIGHT
+screenWidth, screenHeight
 );%0A 
@@ -1051,24 +1051,90 @@
 ion(0, 0);%0A%0A
+        container.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A
         cont
@@ -1241,24 +1241,57 @@
 uestFocus();
+%0A%0A        addMouseListener(this);
 %0A    %7D%0A%0A%09pub
@@ -1376,11 +1376,414 @@
 n() %7B%0A%09%7D
+%0A%0A    @Override%0A    public void mouseClicked(MouseEvent e) %7B%0A        System.out.println(%22Clicked: %22 + e.getX() + %22:%22 + e.getY());%0A    %7D%0A%0A    @Override%0A    public void mousePressed(MouseEvent e) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void mouseReleased(MouseEvent e) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void mouseEntered(MouseEvent e) %7B%0A%0A    %7D%0A%0A    @Override%0A    public void mouseExited(MouseEvent e) %7B%0A%0A    %7D
 %0A%7D%0A

Add mouse listener