Im trying to add some html code to JButtons which later i make them look as cards, which look like bootstrap cards. I was able to add h3 h1 tittles but when i tried to add some imgs to my JButton Cards it is not printing it, instead, its printing some example picture from Java library or W/E.
My code is this:
JButton btn = new JButton("<html><img src=/" + j.getListaCartas().get(i).getUrlImagen() + "/ height=\"64px\" width=\"64px\"><h3>" + j.getListaCartas().get(i).getNombre() + "</h3><br>" + j.getListaCartas().get(i).getTipo() + "<br>" + j.getListaCartas().get(i).getATK() + "<br>" + j.getListaCartas().get(i).getDEF() + "<br>" + j.getListaCartas().get(i).getElemento() + "<br>" + "</html>");
the "getListaCartas().get(i).getUrlImagen()" returns the following:
C:\Users\sportak\Documents\NetBeansProjects\ThunderCards\ThunderCards\fondoCartas.png
which is the correct absolute route for the img, what is the problem then? JButton cant display img? Is not compatible?
Thank you team!