tags:

views:

143

answers:

2

I get the following error in Eclipse:

DISPOSE_ON_CLOSE cannot be resolved something.java javadir/src/ line xxxx Java Problem

DISPOSE_ON_CLOSE is in javax.swing but even when I add import javax.swing.*; it doesn't work.

ANy ideas?

+4  A: 

Start with a fully qualified reference:

javax.swing.WindowConstants.DISPOSE_ON_CLOSE

then when you have time, read this section on static import

jdigital
+1  A: 

DISPOSE_ON_CLOSE is not directly in javax.swing.*, but in WindowConstants interface, so you need to use WindowConstants.DISPOSE_ON_CLOSE.

Peter Štibraný