Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!

Christopher Sheridan

Ranch Hand
+ Follow
since Mar 07, 2015
Christopher likes ...
IntelliJ IDE Java Linux
Southern United States
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
9
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Christopher Sheridan

I figured it out.

2 years ago
I am trying to learn how to utilize predicates in Java. I have this in my init() method to set everything up. When something is typed in the search/filter TextField ("filterInput"), nothing changes. What am I doing wrong?


2 years ago
I've managed to successfully (albeit broken) a filter for a ListView. It only filters the FIRST entry, and disregards the rest. Can anyone tell me what I'm missing?

I am so close to getting this!!!

Screenshots included below.

Here are the two methods that do the work:

2 years ago
Actually, I wrote print statements for all of my buttons to see what was going on via the console, and EVERY button has to be clicked twice.

So, I have that bug, and one more bug:

I have my radio buttons set as boolean values. If it is checked, it should print true. If it is not checked, it should print false.

I'm so close to being done with this. At least I've come this far, but this bug is kind of driving me batty.

Take a look:
2 years ago
I don't know how to do that, or what that method does. I'm very new to JavaFX.
2 years ago
Thanks for letting me know! Useful info since I'm using Java 8. :-)
2 years ago
I have methods written to handle the actions for check boxes. This is as far as I've gotten:

When checking a certain category of plant, the ones that are not relevant are supposed to disappear from view. When they are un-checked, they reappear. The problem is that I have to initially click a CheckBox twice to begin the process. The other boxes and buttons need to disappear on the first click. It's almost like the annoying mistake we make sometimes with the Scanner class and having to fire an extra input.nextLine() so the first input is not consumed. At least that's what it reminds me of.

Can someone help me out? I don't understand why this is happening.

Note: I included two screenshots of the GUI so you know what I'm doing.

Here is the segment of code:


Here is a line in FXML if it's relevant:



I am using SceneBuilder 2.0 also.
2 years ago
I know this post is old, but I did a google search for "good book for JavaFX", and stumbled across this post. I'm a member of the ranch (fairly new but I love the community), and for some reason it was awesome to see an actual programming author on here. Sorry for necrobumping this. Haha.

I think I'll check the book out!
2 years ago
Nevermind on the scroll pane. I kept typing Strings and as soon as it reached the bottom, it automatically generated one. Is this a feature that I'm unaware of? What caused it?
2 years ago
Now that I'm sitting in front of my machine and looking at my code, that makes complete sense. I noticed the two clicks originally with my Save button, and the erroneous lambda expression in my buttonClick() method.

I'm looking forward to making richer UI's.

One thing I realized with the setting of the ListView is that I struggle greatly with constructors and parameters, even if it's coding up a console-only app. I just need to get a better grasp on them. I would've never thought to next the new VBox inside the new Scene, at least not at this point in my learning.

Despite my error, I'm happy to know that I made what I made through reading and trial and error up until those points. Thank you for your help.

Next, I think I'll work on adding a ScrollPane. :-)
2 years ago
http://www.cs.wustl.edu/~kjg/CS101_SP97/Notes/SquareRoot/sqrt.html

Read through this. Study it. Do some work on paper.

Hopefully you know how to calculate derivatives. :-)
2 years ago
I just noticed where Knute asked about setting the list in the scene. Completely overlooked it.

2 years ago
I understood everything except what you mentioned about stage1.setScene (scene1). Are you saying I need to remove it from the lambda expression and put it in curly braces underneath the expression instead? Or something completely different?

Thank you for the other criticism. It's greatly appreciated.
2 years ago
Nevermind, that just prompts the user. The .getText method should be doing it. Maybe I'll try to debug with some print statements to see what is being taken as input.
2 years ago