Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: opening isdn connection with external file Date: Tue, 28 Feb 2012 13:34:55 -0500 Organization: A noiseless patient Spider Lines: 51 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 28 Feb 2012 18:34:43 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="BSKXKq4dV+7jFlM4JDctyw"; logging-data="28565"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kYgVcJeO0H9vMFz+Kdggt9fSAO0HHQ2U=" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120207 Icedove/3.0.11 In-Reply-To: Cancel-Lock: sha1:YohGukE3jGSzecSKbtkbMo/vfLc= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:12500 On 02/28/2012 12:24 PM, Lew wrote: > 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. > Huh, it's so funny how my feeble little mind works (or doesn't) sometimes. Despite the OP's code sample , error message, and pointer to the line where the error occurred; I completely missed the public class JOptionPaneTest1 declaration! Thanks.