Can anybody give me some simple code from Swing to add a gif file (stored on c drive) to an application for an assignment I'm working on. I thought this would be the easiest part of the whole assignment but for some reason I can't get it. I'm not sure what to use....ImageIcon? Please help! Desperate student!
posted 10 years ago
add the gif file as the icon for a JLabel add the JLabel to a JPanel add the panel to the JFrame/contentPane