The first time I saw this video, I was just trying to learn new things about javafx. This second time, u saved my live and a work I have been doing for two days. Thx so much!
I have a shoppingcart with a listview with the amount for each product you ordered. With a button you can remove one amount of the product you've selected. The amount get succesfully removed however my listview doesn't update realtime and I have to exit and open the shoppingcart scene to update it. How would I go about updating my listview after I clicked on the remove button?
how do i do this for checkbox i have a program i have to do for school where there is gamename, gameplatform, radiobuttons and checkbox how would this be applicable for checkboxes and radiobuttons
Hey Bro when I try to do myListView.getItems().addAll(); it says: Cannot invoke "javafx.scene.control.ListView.getItems()" because "this.myListView" is null
@@tayuraaa hey man. It was a long time ago, I don't exactly remember. I just remember I found a way around it by using TreeView instead of ListView. Anyways, I did my project before Chat GPT was a thing, so try getting help from Chat. Best of luck!
Whats up bro. So i have a project that a user will input customer data. Once they input it is it best to use a list view to display it as an existing customer? If so how do i add textfield data to the myListView?
package application;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.Spinner;
import javafx.scene.control.SpinnerValueFactory;
import javafx.scene.control.SpinnerValueFactory.IntegerSpinnerValueFactory;
public class Controller implements Initializable{
@FXML
private ListView myListView;
@FXML
private Label myLabel;
String[] food = {"pizza","sushi","ramen"};
String currentFood;
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
myListView.getItems().addAll(food);
myListView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
@Override
public void changed(ObservableValue
The first time I saw this video, I was just trying to learn new things about javafx. This second time, u saved my live and a work I have been doing for two days. Thx so much!
Thank you Bro Code!
You doing very informative and awesome videos!
JavaFX is kinda hard, but you doing it workable. Great job
Very useful, especially that one line in you stickied comment.
I have a shoppingcart with a listview with the amount for each product you ordered. With a button you can remove one amount of the product you've selected. The amount get succesfully removed however my listview doesn't update realtime and I have to exit and open the shoppingcart scene to update it.
How would I go about updating my listview after I clicked on the remove button?
how do i do this for checkbox i have a program i have to do for school where there is gamename, gameplatform, radiobuttons and checkbox how would this be applicable for checkboxes and radiobuttons
Hi!! can you tell me what's equivalent of ttk.Notebook in Java, please!!
Hey Bro
when I try to do
myListView.getItems().addAll();
it says:
Cannot invoke "javafx.scene.control.ListView.getItems()" because "this.myListView" is null
i have the same problem!! Have you been able to fix it??
@@tayuraaa hey man. It was a long time ago, I don't exactly remember. I just remember I found a way around it by using TreeView instead of ListView.
Anyways, I did my project before Chat GPT was a thing, so try getting help from Chat.
Best of luck!
I've think that means the fxml injection of the component didn't work
if i have a listview and i want to use it like in a dictionary, how i can update my listview while typing word
i can't select anything on my list any help??
Whats up bro. So i have a project that a user will input customer data. Once they input it is it best to use a list view to display it as an existing customer? If so how do i add textfield data to the myListView?
Can you make a TableView guide please?
you are a real CHAD
Reduced Code:
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
myListView.getItems().addAll(foodItems);
myListView.getSelectionModel().selectedItemProperty().addListener(
(var,oldValue,newValue) -> {
currentFood = myListView.getSelectionModel().getSelectedItem();
myLabel.setText(currentFood);
}
);
}
Thank you Bro
thanks a lot, you need to know this this really help me!!!
Good Video, thx
LIFE SAVER!!!
Thank you, very cool
Hey it's really helpful please keep it up #brocode
Your all video is damn good 🤠🤠
underrated
Thx Bro!
Javafx is dead
SHUT