I´m working on a quiz game and wan´t to add pictures when you see the questions and remove the pictures, when you see the answers. Both setImage and addObject don´t seem to work. Does somebody know?
questions = new ArrayList<Question>();
// here i want to add a picture
String questionText = "Benenne?";
ArrayList<Answer> answers = new ArrayList<Answer>();
answers.add(new Answer("Pentensäure", false));
answers.add(new Answer("Butansäure", false));
answers.add(new Answer("Pentansäure", true));
answers.add(new Answer("Methan", false));
Collections.shuffle(answers);
Question question = new Question(questionText, answers);
String explanation = "Die richtige Antwort war Pentansäure. ";
question.setExplanation(explanation);
questions.add(question);
Collections.shuffle(questions);
// here are more questions but its basically the same code
