From: Bill Z. <wrz...@po...> - 2005-03-06 21:46:37
|
Thorsten Klose wrote: >Isn't there a simpler method? So far I can see this would require some >lines of code to derive the filename, load the file into a buffer and >forward it to ImageIcon() - and it would require an error handling. > > It's actually very easy, Java already has the hooks. For MIDIboxFM, you'd use: algIcon[0]=new ImageIcon(MIDIboxFMDevice.class.getResource("images/alg_0.gif")); You can use device.getClass() instead if you want. -Bill |