Originally posted by Javed Inamdar:
Anybody tell me is there any component in Java whose width we can specify in double/long?
Do you actually have a need for a Component with a double/long width?
Long would only be useful if you planned to have a Component that
was wider than 2.1 billion pixels, hence Campbell Ritchie's comment.
Double would only be useful if you planned to have a Component
with a fractional width, such as 33.3 pixels. This can actually
make sense at times. To that end the javax.swing.text.View class
has a getPreferredSpan() method that returns a float, and the
java.awt.geom.RectangularShape class has a getWidth() method that
returns a double. But neither of these are Components with a
capital C.