hiya,
briefly what i want to do is pass a string into a method and use a variable holding the string in place of the string itself.
public void actionPerformed(ActionEvent e) { if(e.getSource() == orange) { changeColor("orange"); } public String changeColor(String text) { text.setBackground(Color.orange); return color; }