setOpaque(false); loadSupportImage(); setTransferHandler(new ImageTransferHandler(mainFrame));
try { URL resource = getClass().getResource("/images/drop.png"); dropHere = GraphicsUtilities.loadCompatibleImage(resource); } catch (IOException e) { e.printStackTrace(); }
int x = (getWidth() - dropHere.getWidth()) / 2; int y = (getHeight() - dropHere.getHeight()) / 2; g.drawImage(dropHere, x, y, null);