A simple way to setting a bufferedImage into a single colored pixel without placing a image into it?
问题 So I just want to set a buffered image into a single background color is there a way to do this? 回答1: Do you mean fill a BufferedImage with a background color? If so, here is an example on how to perform this: import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.SwingUtilities; public class TestBufferedImage { private BufferedImage buffer; protected