

Task

Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.).



Related task

   Hello world/Text


import java.awt.*
import javax.swing.*
 
fun main(args: Array<String>) {
    JOptionPane.showMessageDialog(null, "Goodbye, World!") // in alert box
    with(JFrame("Goodbye, World!")) {                      // on title bar
        layout = FlowLayout()
        add(JButton("Goodbye, World!"))                    // on button
        add(JTextArea("Goodbye, World!"))                  // in editable area
        pack()
        defaultCloseOperation = JFrame.EXIT_ON_CLOSE
        isVisible = true
    }
}