the java tutorials website is down :(
I changed imgUrl with "/resources/icon.png" but when I run it, it doesnt shows up, thought maybe png format wasnt supported but neither is gif, so I think there is something wrong with the code.
meanwhile I want to add copy-to-clipboard functionality to a JMenuItem, I tried something with setAction and DefaultEditorKit.copyAction but can't figure it out, any ideas?

thanks kevin

ADDED: java tutorials website's up :)

September 29th, 2011, 07:39 AM

KevinWorkman

Re: window icon

What happens if you use the full path?

September 29th, 2011, 10:37 AM

luisp88

Re: window icon

how do I put the full path? like "C:\Users\user\Documents\NetBeansProjects\project\ src\resources\img.png" ? I tried creating an Image object and thus, set the image to the frame but didnt work because cant create an Image object.

September 29th, 2011, 10:49 AM

KevinWorkman

Re: window icon

Yeah, that looks like a full path.

Unfortunately, if you want more help, you're going to have to post an SSCCE (which in your case should only be a few lines) so I can see exactly what you're trying to do.

September 29th, 2011, 01:56 PM

luisp88

Re: window icon

ok problem solved, the absolutepath was C: so I need to move my icon to C:\resources\icon.gif or put the full path
thanks!