I'm goofing around using Kojo to explore different things, and wanted to explore Swing. Having a problem because Frame.DISPOSE_ON_CLOSE is claimed not to be a member of java.swing.JFrame? No problem with EXIT_ON_CLOSE but I don't want to use that, because Kojo gets killed every time I close the window.
import java.awt.Graphics import java.awt.image.BufferedImage import javax.swing.JComponent import javax.swing.JFrame val frame: JFrame = new JFrame("Fractal") frame.setSize(640,320) frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE) frame.setVisible(true)
Error[9,39]: value DISPOSE_ON_CLOSE is not a member of object javax.swing.JFrame
I realise Kojo isn't necessarily meant to be used in this way, but for my better understanding, I am curious why DISPOSE_ON_CLOSE doesn't show up!