java - Completely Changing JLabel on command -


what i'm trying have image set label. problem when go change image through confirmation button, nothing happens.

i'm using netbeans jframe designer or whatever, here doing..

default, have jlabel set normal no changes or anything. made , removed text, empty. when user clicks button, want image come up, choose. i'm trying change color of image, choose go to.

frontdesign = new jlabel(new imageicon(functions.getshirt("front"))); 

this i'm using change it. i'm resetting jlabel, isn't doing anything.. there solution, or doing wrong?

don't create new label. changing reference of variable not add label gui. newly created label sitting in memory doing nothing.

just use:

frontdesign.seticon(...); 

this replace icon off label displayed on frame.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -