mel21lio
302Messages postés
14 juillet 2009Date d'inscription
13 août 2009 à 15:34
c'est faut tu mets l'images ou tu veux
public JButton makeButton(String imageName, String actionCommand, String toolTipText, String altText) {
// Look for the image.
String imgLocation = "file://" + pwd + "src/main/resources/guiimg/" + imageName;
URL imageURL = null;
try {
imageURL = new URL(imgLocation);
} catch (MalformedURLException e) {
e.printStackTrace();
}
;
ici le pwd represent bien ma racine de projet
mais j'aurais put la foutre dans une clef usb
String imgLocation = "file://media/usb/maclef/metsimages";