guys i am working on a small software in which frame appear thats show a image that your drive c is damaged and than another frame by 6sec delay show a "just kidding" image.now i want to connect this program with my usb so that when ever i plug in usb the program automaticaly run and show the frame.is there any way to do this task.thanks
1) I would divide this project into two main parts. First is designing GUI in java.
2) And then make an autorun file, with some configuration, so that you can run the file you want.
Now lets concentrate on java part, in the GUI you need to display the picture. And for that, you can use "BufferedImage" and "Graphics". What I do to draw images on Java GUIs, is to make a big label and use the picture as an icon for that label.Once you have the picture use "Robot class" to get the delay and then you can use the image back.