Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: opening isdn connection with external file Date: Tue, 28 Feb 2012 09:24:34 -0800 Organization: albasani.net Lines: 46 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net zYbElMcyNSqnrDpV2BMnX692vlByGpZ8U63D2n810U1JkgHio+tNDn8Yl4j9ytzjOKZg2Lwmi+ROgy6iclraAFw77qHtiiB0q77Ymz2DnBGPwhlk9x32ndvZBJSseXRL NNTP-Posting-Date: Tue, 28 Feb 2012 17:24:28 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="6NKSyigd4IWssuBP2gemrGHs+urMMowJkXOmFHA/oJWa+T3SF/XUrhICLYhaeo1Fizh1GgtTiRIqC4LIAnGQURp7rbzXT9CBFVFAqpKQn1gvSDLoBfidrxhNe3ZrZh+3"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: Cancel-Lock: sha1:8R7xxwFgB2Kn9j/u0h8NnfCuMPc= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:12496 On 02/27/2012 11:17 PM, nescafe wrote: > /* > * KutinaApp.java > */ > > package kutina; > import javax.swing.JOptionPane; > import org.jdesktop.application.Application; > import org.jdesktop.application.SingleFrameApplication; > > public class KutinaApp extends SingleFrameApplication { > > @Override protected void startup() { > show(new KutinaView(this)); > } > @Override protected void configureWindow(java.awt.Window root) { > } > public static KutinaApp getApplication() { > return Application.getInstance(KutinaApp.class); > } > > //-------------------------------------------------------------------------- > public class JOptionPaneTest1 { > > public static void main(String[] args) { > //******** inner class cannot have static declarations ************ Since you declared 'JOptionPaneTest1' (terrible name) inside another type without the 'static' keyword, it's an inner class, not a static nested class. Inner classes cannot have static members. You declared a static member 'main()' within that inner class. Just like the message says, inner classes cannot have static declarations. Very straightforward. > ... > ------------------------- > I get error : inner classes cannot have static declarations ? > I googleit but all examples are the same and there should be no error. As Jeff suggested, the tutorial is a great place to start. After that, GIYF, too. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg