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

Yes, it is possible.

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.

Hope this helps.

thanks man but i have done the half part now i want to run it through usb as i said...so i will search on autorun file

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.