Hey everyone, this is my first post to ask a question that I hope won't be too difficult to solve.
I am trying to make a small app that keeps score in a darts game including games, sets, current score etc...
I want to display the score after each player has thrown their three darts, however, after entering in three scores and clicking the button to take the total of these scores away from the initial 501, the score which I had displayed in a JLabel did not update.
I have tried to change it to a JTExtField in the hope that outputting it this way will allow the value to change.
I wanted to make sure that the value of each players score could not be edited and came across the method "setEditable()" and I tried to implement it, however, when adding this line in including the false for the boolean, I get the following error message: "Type Mismatch; Cannot convert from Void to JTextField".
This is what the section of my code looks like:
scoreBox1 = new JTextField(3).setEditable(false); panel1.add(scoreBox1); scoreBox1.setText(Player1Score);
I would be very grateful for some help, many thanks in advance, Rob.