Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to set ScrollPane() maxHeight="-Infinity" in java code.

3015200Aug 18 2015 — edited Aug 20 2015

I see examples like the following in FXML.

ScrollPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0"

How do I set max/min Height & max/min Width to "Infinity" using java code?  The Java API doc shows set__Height() and set___Width as only taking a native double.  Traveling up the type hierarchy was not help either.

Is this a bug in the API?  Should the getters and setter be of the type Double, the class, not double the native type?  Double the class has a "POSITIVE_INFINITY" enumeration.

Double d = new Double(Double.POSITIVE_INFINITY)

Message was edited by: 3015200

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2015
Added on Aug 18 2015
1 comment
1,289 views