Michael Sims
Campbell Ritchie wrote:Please explain exactly what you want to do.
Michael Sims
Paul Clapham wrote:But Strings never change -- they are immutable
Michael Sims
4.3.3. The Class String
Instances of class String represent sequences of Unicode code points.
A String object has a constant (unchanging) value.
String literals (§3.10.5) are references to instances of class String.
The string concatenation operator + (§15.18.1) implicitly creates a new String object when the result is not a constant expression (§15.28).
10.9. An Array of Characters Is Not a String
In the Java programming language, unlike C, an array of char is not a String, and neither a String nor an array of char is terminated by '\u0000' (the NUL character).
A String object is immutable, that is, its contents never change, while an array of char has mutable elements.
The method toCharArray in class String returns an array of characters containing the same character sequence as a String. The class StringBuffer implements useful methods on mutable arrays of characters.
Good point. I think I knew that but didn't write it last night.John Damien Smith wrote:. . . So the JavaFX developers have already done all of the work of implementing all of the patterns that Campbell Ritchie outlines.
Yes, I meant the Observable interface not the class in java.util. That is useful information (thank you ), which I don't have the time to explore this week, but I shall look at later. I remember Cai Horstmann writing somewhere about “properties, like in C#, but better.” It is a very long time since I tried any C# but I think they may have succeeded there. . . > Anybody know whether that Observable interface and the change listener are generally applicable, or whether they are specific to JavaFX
I assume you refer to javafx.beans.Observableand not java.util.Observable. . . . as long as the JavaFX libraries are present in the JRE that you are using as your runtime, then you can use the JavaFX binding and property systems from any Java program . . . .
Michael Sims
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|