

Task

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



Related task

   Hello world/Text


package HelloWorldGraphical where
 
import Java.Swing
 
main _ = do
    frame <- JFrame.new "Goodbye, world!"
    frame.setDefaultCloseOperation(JFrame.dispose_on_close)
    label <- JLabel.new "Goodbye, world!"
    cp <- frame.getContentPane
    cp.add label
    frame.pack
    frame.setVisible true