Thanks for the suggestions! 
Ok, let’s see if I can explain the architecture
Tha classes involved is: MainClass, GraphicsEngine, InputListener, Button.
MainClass implements Runnable and has references to GraphicsEngine, and InputListener. Hosts the shutdown method that looks like this:
public void stopAll(){
inLis.listening = false; //Stops input listening
ge.looping = false; //Stops graphics drawing
running = false; //Stops everything within this class
}
GraphicsEngine implements Runnable and has references to MainClass and Button, it also hosts a method that forwards a shutdown command to MainClass.
InputListener implements Runnable and has references to GraphicsEngine and MainClass
All these classes has a while loop that is controlled by the booleans in the stopAll() method. Therefore the program stops quite fluently when setting them to false.
Now onto Button
Button has no references, GraphicsEngine has an Array of Buttons that is drawn onto the screen, I initialized the Button array by using an Array initializer, and due to Button’s constructor, it is difficult to handle any exception thrown inside the Button class, outside it’s constructor.
The constructor looks like this:
public Button(String buttonsection, String filenamenotpressed, String filenamehovered, int posx, int posy){
try{
img = loadImage(filenamenotpressed);
}catch(NullPointerException nullpointer){
System.err.println("Shit just hit the fan and image " + filenamenotpressed + " can't be loaded");
System.err.println("If you are not familiar with Java or C# programming techniques, don't panic");
System.err.println("Simply stand up, wave your arms like a raving idiot, and scream in anguish!");
System.err.println("If you are a Java or C# programmer, take a look at this stack trace, then give it to the developer");
nullpointer.printStackTrace();
}
try{
imgPressed = loadImage(filenamehovered);
}catch(NullPointerException nullpointer){
System.err.println("Shit just hit the fan and image " + filenamenotpressed + " can't be loaded");
System.err.println("If you are not familiar with Java or C# programming techniques, don't panic");
System.err.println("Simply stand up, wave your arms like a raving idiot, and scream in anguish!");
System.err.println("If you are a Java or C# programmer, take a look at this stack trace, then give it to the developer");
nullpointer.printStackTrace();
}
setX(posx);
setY(posy);
section = buttonsection;
}
The loadImage method like this:
@Override
public Image loadImage(String path){
System.out.println("Loading image: " + path);
Image tempImg = new ImageIcon(getClass().getResource(path)).getImage();
if(tempImg != null){
System.out.println("Image " + path + " loaded without errors");
return tempImg;
}else{
throw new NullPointerException();
}
}
I hope this information is useful