How to remove Background of Jpanel while converting image (png). I tried following line to remove the background of the panel but The converted image background become black.
g2.clearRect(0, 0, getWidth(), getHeight());
How to remove Background of Jpanel while converting image (png). I tried following line to remove the background of the panel but The converted image background become black.
g2.clearRect(0, 0, getWidth(), getHeight());
draw a filled rectangle with the background color...
Color backGround = getBackGround();
g2.setColor(background);
g2.fillRect(0,0,getWidth(), getHeight() );