How aboutSimon Ritchie wrote:. . . The reason I chose that package name is just for simplicity. . . .
No. It simply means everybody uses ArrayList instead. You get much more flexibility if you say List.Vector is a legacy class? Does that mean its use is being discouraged and it's soon to be deprecated? . . .
According to books like Core Java II by Horstmann and Cornell (latest edition by Horstmann only), it has proven very difficult to create a thread‑safe GUI framework which executes at a speed greater than that of a snail with ingrowing toenails. So there are severe restrictions about threading GUIs. In Swing, you would start a worker thread (see the Java™ Tutorials), which runs separately from the display. I presume there is something analogous in FX.. . . incorporate multiple threads into the GUI . . . I wanted the algorithm to run in its own thread.
My pleasure Actually it is nice to read.Many thanks for looking at my code, though!
Campbell Ritchie wrote:
No. It simply means everybody uses ArrayList instead. You get much more flexibility if you say List.Vector is a legacy class? Does that mean its use is being discouraged and it's soon to be deprecated? . . .
According to books like Core Java II by Horstmann and Cornell (latest edition by Horstmann only), it has proven very difficult to create a thread‑safe GUI framework which executes at a speed greater than that of a snail with ingrowing toenails. So there are severe restrictions about threading GUIs. In Swing, you would start a worker thread (see the Java™ Tutorials), which runs separately from the display. I presume there is something analogous in FX.Campbell Ritchie wrote:
Campbell Ritchie wrote:My pleasure Actually it is nice to read.
According to my SpeedCrunch app: 300 × √2 = 424.26406871192851464051;Simon Ritchie wrote:I'm getting some very strange results . . . The result of Math.hypot(xord, yord) is 424.26406871192853. . . .
Campbell Ritchie wrote:Why are you using Thread#sleep? I don't know about FX, but if you use Thread#sleep in a Swing application, you are liable to freeze the display. It also depends which Thread you are sleeping; it may be all right to make a worker thread sleep. But please consider why you want it to sleep at all.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Agree; that can wait until after you have been through the rest of the code.Simon Ritchie wrote:. . . I'll make the changes to the documentation on the interface later, I promise ;-)
Sorry I didn't notice that bit earlier.Simon Ritchie wrote:. . . I feel stupid for asking but what do you mean by "legacy class" - what is it and why is it a bad thing? . . .
Campbell Ritchie wrote:I thought FX was older than Java8. I may be mistaken, however.
Simon Ritchie wrote:I'll make changes to the for loops too, as you recommended, but how would it look when re-written in Java 8 (I'm assuming you mean re-write the for loop in Java 8)
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Don't get me started about those stupid light bulbs. |