Hey, what I wanted to do was to get the mouse coordinates. Doing that though gives me a nullpointerexception and I dont really understand why.
This is the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | if (diffT == 0 ) { if (mouse.getX()> 89 && mouse.getX()< 364 && mouse.getY()> 545 && mouse.getY()< 677 ) { diff = 1 ; diffT++; } if (mouse.getX()> 786 && mouse.getX()< 1155 && mouse.getY()> 545 && mouse.getY()< 677 ) { diff = 2 ; diffT++; } if (mouse.getX()> 1236 && mouse.getX()< 1500 && mouse.getY()> 545 && mouse.getY()< 677 ) { diff = 3 ; diffT++; } } |