Made constructor parameter g final

So it can be used inside mouse listener