I am trying to figure out how to convert text from text fields into intergers in Eclipse. here is what I have so far, and it's been a few days since I have worked on this program and I am also new to java coding. If I have the code I need in here already, I apologize in advance for asking this question.
protected void do_enterButton_actionPerformed(ActionEvent arg0) {
    int scr1, scr2, scr3 = -1;
    TestScores score = (TestScores)studentList.getSelectedValue();
    int score1 = Integer.parseInt(score1TextField.getText());
    score.setScore1(score1);
    int score2 = Integer.parseInt(score2TextField.getText());
    score.setScore2(score2);
    int score3 = Integer.parseInt(score3TextField.getText());
    score.setScore3(score3);
    if (score1TextField != null) {
        // this is where I need to convert to text to integer
    }
 
     
    