How to detect mouse?

Hello I am writing a Java program to detect whether the mouse is present or not. It will be really helpful if anyone can post a sample code.thank you!
[164 byte] By [Lana82a] at [2007-11-27 9:11:43]
# 1

you probably can not do this in java. think of it this way, can you think of a way to do this in the same way on all OSes which support java? probably not. This is an OS specific function which java probably does not support.

on the other hand, you can ask the user to move the mouse, and if they dont move it - then they dont have it?

mkoryaka at 2007-7-12 21:57:31 > top of Java-index,Java Essentials,Java Programming...
# 2
the mouse in use is a usb powered one. So is it the same case?The program i doing is just a simple one. All it has to do is, when the usb mouse is inserted it has to notify the user "mouse detected".Thats all, so is it possible? Thank you!
Lana82a at 2007-7-12 21:57:31 > top of Java-index,Java Essentials,Java Programming...
# 3
The operating system should do that for you ... It does if it's Windoze.
ejpa at 2007-7-12 21:57:31 > top of Java-index,Java Essentials,Java Programming...