This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!

Knute Snortum

+ Follow
since Apr 20, 2013
Knute likes ...
Chrome Eclipse IDE Java Postgres Database VI Editor
Forum Moderator
After 25 years of programming, Knute has retired to be a professional musician. Knute first learned BASIC and Cobol on a CPM Timeshare system circa 1985. He spent way too long coding in one flavor of Business Basic or another. Going back to college, he learned C and a whole new world opened up to him. Knute likes Perl and Java, for completely opposite reasons. Knute is a complex person.
Portland, Oregon
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Knute Snortum

Daniel Demesmaecker wrote:... Don't you have an ide that organises your imports for you?

Beginners in Java are often coached to not use an IDE at first, so they are learning the basics of the language before learning the IDE.
2 days ago
You can simplify some of those (well, make them shorter at least) by using greedy quantifiers:
4 days ago
I would break this down logically on paper (or whatever you use for writing text).

Think about how you would solve this as a human, and only then start coding.

So the challenge can be brokening into two tasks: 1) no consecutive 3's, and 2) a total of exactly three 3's.  The second tack is the easiest: sum the number of 3's.  You seem to be doing that.  Then think of how you would determine if two 3's are next to each other.

Got all that?  Okay, you can start coding again.  I would save your first, or start a new isIt() method.
1 week ago
Things are very different with JavaFX 11.  It's no longer bundles with the JDK so to use it you have to get the jars you need elsewhere and import then into your project.  Maven or other builds tool that deal with dependency management really ease this transition, but it's still a pain.  I'm now getting Java 11 from OpenJDK because of Oracle's licensing changes.
1 week ago
Hey, it took me a while to convince myself that you hadn't found a cool new way to do multi-scene JavaFX, but sadly, no.

So, I think you need a whole new approach to doing this.  To see one way that I developed, look at this GitHub repo.  You'll need to look at the pre-javafx-11 branch unless you are using JavaFX 11.

You can also search GitHub and find other ways to do this.
1 week ago
Use a prepared statement.
Looks like the variable "scene" is null, probably because this Node (root) isn't part of the Scene.

Can we step back a bit?  Are you doing multiple Scenes with FXML loading?  How do the FXML files get loaded?  How does a specific controller know what scene to manage?
1 week ago
Remember to TellTheDetails (that's a link).  What happens?  What line?  Is there an error?  Did you post the complete error message, with the stack trace?
1 week ago
...also, welcome to the Ranch!
1 week ago
I would move these lines of code:
to inside the initialize() method.  I suspect that root hasn't been injected when you get to line 16.
1 week ago
(For those wondering, SCHWERWIEGEND means Severe.)

Does the error occur in the Build or Run phase of the project?  Try executing them separately.
1 week ago

Sam Ritter wrote:I found this article for using maven from ant.

But that article is nine years old.  Maybe there are some more modern way to accomplish what you need.
1 week ago