"LeftRightPanel.java:45: setText(java.lang.String) in javax.swing.JLabel cannot be applied to (int)
label.setText(num1);"
I'm guessing that this is because I'm trying to imput a int in a line where there's supposed to be text. Can I do something like .setNumber, .setNum, or .setInt? Or is this an issue that I need to adrress earlier in the program..... Thanks for any help!
EDIT:
Also tried this (referring to it as a "toString" I believe???
private class ButtonListener implements ActionListener{
public void actionPerformed (ActionEvent event){
int numPlus, numMinus, count;
String text = label.getText();
numPlus = count + 50;
numMinus = 50 - count;
if (event.getSource() == plus)
count++;
label.setText(numPlus);
if (event.getSource() == minus)
count++;
label.setText(numMinus);
That's still giving me:
LeftRightPanel.java:47: setText(java.lang.String) in javax.swing.JLabel cannot be applied to (int)
label.setText(numPlus);
^
John