Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.optima.hr!.POSTED!not-for-mail From: nescafe Newsgroups: comp.lang.java.programmer Subject: Re: opening isdn connection with external file Date: Wed, 29 Feb 2012 07:18:20 +0100 Organization: Optima Telekom Usenet server Lines: 80 Message-ID: References: NNTP-Posting-Host: 85.114.42.50 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: l01news1.ot.hr 1330496302 436 85.114.42.50 (29 Feb 2012 06:18:22 GMT) X-Complaints-To: abuse@optinet.hr NNTP-Posting-Date: Wed, 29 Feb 2012 06:18:22 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:12514 On 02/28/2012 09:54 PM, Lew wrote: > Jeff Higgins wrote: >> Lew wrote: >>> 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! > > That's because his indentation sucks. He did everything in his power to > hide that the inner class was an inner class. > > I had to reconstruct the indentation for my reply to be readable. This > made it obvious that the ill-named 'JOptionPaneTest1' was an inner class. > -------------------- OK. I do have one more question. If i open isdn connection and directly after that i open some data logger i can not close the same isdn connection ** automatically** on data logger closing. Basicaly, i close data logger program but isdn connections is still connected. Shortly: open isdn connection open datalogger close datalogger close isdn connection. When program starts, he opens isdn and when i X-it the datalogger, isdn should be closed and not before.