B
Barkster
I'm try to use a function to set some text and set the icons of various
labels and I thought I could send the labelnames to the function and
use it to set them but I'm having issues. It doesn't work all the time.
It randomly sets the text of various labels or sometimes none at all.
Can't figure it out. Here is what I have, I've very new to java so I'm
obviously doing something wrong.
public void jButton6_actionPerformed(ActionEvent e) {
GetThumb(this.jLabel6, this.jTextField6);
}
public void GetThumb(JLabel labelNo, JTextField fieldNo) {
labelNo.setIcon(thumbnail);
fieldNo.setText(name);
}
labels and I thought I could send the labelnames to the function and
use it to set them but I'm having issues. It doesn't work all the time.
It randomly sets the text of various labels or sometimes none at all.
Can't figure it out. Here is what I have, I've very new to java so I'm
obviously doing something wrong.
public void jButton6_actionPerformed(ActionEvent e) {
GetThumb(this.jLabel6, this.jTextField6);
}
public void GetThumb(JLabel labelNo, JTextField fieldNo) {
labelNo.setIcon(thumbnail);
fieldNo.setText(name);
}