Java Swing image cut off/zoomed

when I try to render a png image in Java Swing, it is cut off/zoomed on all sides. Here is my code: this.setSize(500, 500); this.setResizable(false); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); this.getGraphics().drawImage(getImage("IMAGE PATH"), 0, 0, this); And this is my getImage function public static Image getImage(String path) { File file = new File(path); try { return; } catch… Read More Java Swing image cut off/zoomed