I found this code on the internet and made some changes, but I'm not sure what's going wrong.
Code:
public class main
{
public static void main(String[] args) throws IOException
{
String key = "Lucas Caresia";
BufferedImage bufferedImage = ImageIO.read(new File("recibo.png"));
Graphics graphics = bufferedImage.getGraphics();
graphics.setColor(Color.BLACK);
graphics.setFont(new Font("Arial Black", Font.PLAIN, 15));
graphics.drawString(key, 420, 560);
ImageIO.write(bufferedImage, "png", new File("recibo.jpg"));
System.out.println("Image Created");
}
}
Previous image:
Imageafter(viewedbyeclipse):