Hi,
Any Help, I need guide/way on how to get Image from JLabel and set it to JTextArea in netbeans when a button is clicked.
I have 3 Object: (1) Jlabel(with an imported picture in it) (2) JTextArea(to store the picture when Button is clicked) (3)A button
I tried using a method:
private Icon Icon;
private Icon Image;
public Icon getImage(){
return Icon;
}
//CODE FOR BUTTON(GET IMAGE)
Image=l.getIcon();
S.setText(""+Image); // S is the variable name for the JTextArea
it on captures the file link of the image and displays it in the textArea field when the Button is clicked