What's the purpose of this strange poll? Anyway...basically, you've to make the mouse to be placed in the center of the screen and get the deltas in x and y direction for each frame. Divide this deltas by some value that fits your needs and your mouse speed and rotate the camera accordingly around the x- (for up/down) and y- (for left/right) axis. Then reset the mouse back to the center.
To do this in OpenGL mode, LWJGL has a mouse class. To do this in AWT/Swing, usw java.awt.robot and calculate the deltas yourself. The Paradroidz-sources include a mouse mapper that should handle most of this (the mouse management, not the rotation of the camera itself of course).