Originally Posted by
retsameht
when you are appending the builder variable, i notice you only apend the "\n" newline and nothing else. You need to append the record to the builder variable:
i.ei.
builder.append(plate."something");
builder.append("\n");
now I don't know how your record class is define, but if you want to append String, you need to have a string variable in your record class such as (String name)?
thanks for your help brother i got it with this
new code:
public static void printPlateSamling(){
StringBuilder builder = new StringBuilder(platesamling.size());
for(VinylPlate plate : platesamling){
builder.append(plate.fullnavn + "\n");
}
//this now works :D
JOptionPane.showMessageDialog(null, builder.toString());
}
also this is my VinylPlate object
public class VinylPlate {
public String artist;
public String tittel;
public String fullnavn;
public String toString(){
return this.fullnavn;
}
}
I should have posted that earlier. Well, thanks for your help guys!
Kind regards,
VikingCoder