public static Comic[] createComics() {
Comic[] comics = new Comic[] {
new Comic("978-0785199618", "Spider-Man:Miles Morales", 112, 0.72),
new Comic("978-0785190219", "Ms.Marvel:No Normal", 120, 0.80),
new Comic("978-0785198956", "Secret Wars", 312, 1.75),
new Comic("978-0785156598", "Infinity Gauntlet", 256, 1.42)
};
return comics;
}
I am fairly new to java and right now I am at a roadblock for displaying that message using joptionpane. I don't want to hardcode it exactly but I have zero clue on how to format my message to the one similar to the image. I'm assuming I have to use String.format but I couldn't find any resources that helps me. The code above is the method for the fake database of comics.