Graphic(int width, int height, int ux, int uy) { frameWidth = width; frameHeight = height; unityX = ux; unityY = uy; this.setOpaque(true); this.setPreferredSize(new Dimension(frameWidth, frameHeight)); this.setBorder(BorderFactory.createBevelBorder(1)); instance = this; function = new FunctionGraphic(new MyTestFunction()); }