<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>javax.swing question</title>
		<link>http://kogics.wikidot.com/forum/t-1418175/javax-swing-question</link>
		<description>Posts in the discussion thread &quot;javax.swing question&quot; - JFrame.DISPOSE_ON_CLOSE</description>
				<copyright></copyright>
		<lastBuildDate>Wed, 15 Apr 2026 14:07:50 +0000</lastBuildDate>
		
					<item>
				<guid>http://kogics.wikidot.com/forum/t-1418175#post-2395383</guid>
				<title>Re: javax.swing question</title>
				<link>http://kogics.wikidot.com/forum/t-1418175/javax-swing-question#post-2395383</link>
				<description></description>
				<pubDate>Thu, 22 Oct 2015 15:45:53 +0000</pubDate>
				<wikidot:authorName>lalitp</wikidot:authorName>				<wikidot:authorUserId>66813</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Try:<br /> import javax.swing.WindowConstants<br /> frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE)</p> <p>DISPOSE_ON_CLOSE is defined in WindowConstants. JFrame implements WindowConstants, but DISPOSE_ON_CLOSE is not visible via JFrame in Scala (can't remember why off the top of my head).</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://kogics.wikidot.com/forum/t-1418175#post-2395310</guid>
				<title>javax.swing question</title>
				<link>http://kogics.wikidot.com/forum/t-1418175/javax-swing-question#post-2395310</link>
				<description></description>
				<pubDate>Thu, 22 Oct 2015 13:35:31 +0000</pubDate>
				<wikidot:authorName>Anthony</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>hi<br /> 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.</p> <div class="code"> <pre><code>import java.awt.Graphics import java.awt.image.BufferedImage import javax.swing.JComponent import javax.swing.JFrame val frame: JFrame = new JFrame(&quot;Fractal&quot;) frame.setSize(640,320) frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE) frame.setVisible(true)</code></pre></div> <p>Results in:</p> <div class="code"> <pre><code>Error[9,39]: value DISPOSE_ON_CLOSE is not a member of object javax.swing.JFrame</code></pre></div> <p>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!</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>