Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #12502
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Lew <noone@lewscanon.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: opening isdn connection with external file |
| Date | Tue, 28 Feb 2012 12:54:04 -0800 |
| Organization | albasani.net |
| Lines | 61 |
| Message-ID | <jijet2$ein$1@news.albasani.net> (permalink) |
| References | <jifr0h$8t3$1@l01news1.ot.hr> <jig902$s2h$1@dont-email.me> <jihsm3$172$1@l01news1.ot.hr> <jihv2j$277$1@l01news1.ot.hr> <jij2kc$j7d$1@news.albasani.net> <jij6o3$rsl$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.albasani.net SE9k4h8ByVNiODxItcNd1WQLrHwp56owjz6hpXp7PM82PrOYrJ0UvBLi+RmxZ7ruL0VLx6rZnS4ASW5hCktmDtPWGc1Z+cGtvo6htm47AEM9ele5bh5SRqLtFXjfd/sL |
| NNTP-Posting-Date | Tue, 28 Feb 2012 20:53:55 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="JRUEVkD42PSLxmDbODvzYDCGeAWa0MWWWakpghbDG858nlT6tf3kMIs6RUrc2MvF7SObAgD6vFBDN+b/tL87bk+4oA4SgvLUERLQe7GBhvVXuz8BGoqVldNaP2h2HaG0"; 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 | <jij6o3$rsl$1@dont-email.me> |
| Cancel-Lock | sha1:ClYEISiz8T/cirKxGm7S79GJLOw= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:12502 |
Show key headers only | View raw
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.
--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
opening isdn connection with external file nescafe <nc@ms.com> - 2012-02-27 12:55 +0100
Re: opening isdn connection with external file Jeff Higgins <jeff@invalid.invalid> - 2012-02-27 10:54 -0500
Re: opening isdn connection with external file nescafe <nc@ms.com> - 2012-02-28 07:36 +0100
Re: opening isdn connection with external file nescafe <nc@ms.com> - 2012-02-28 08:17 +0100
Re: opening isdn connection with external file Jeff Higgins <jeff@invalid.invalid> - 2012-02-28 05:56 -0500
Re: opening isdn connection with external file Jeff Higgins <jeff@invalid.invalid> - 2012-02-28 07:16 -0500
Re: opening isdn connection with external file Jeff Higgins <jeff@invalid.invalid> - 2012-02-28 08:23 -0500
Re: opening isdn connection with external file Jeff Higgins <jeff@invalid.invalid> - 2012-02-28 08:46 -0500
Re: opening isdn connection with external file Lew <noone@lewscanon.com> - 2012-02-28 09:24 -0800
Re: opening isdn connection with external file Jeff Higgins <jeff@invalid.invalid> - 2012-02-28 13:34 -0500
Re: opening isdn connection with external file Lew <noone@lewscanon.com> - 2012-02-28 12:54 -0800
Re: opening isdn connection with external file nescafe <nc@ms.com> - 2012-02-29 07:18 +0100
Re: opening isdn connection with external file Lew <noone@lewscanon.com> - 2012-02-28 22:29 -0800
Re: opening isdn connection with external file nescafe <nc@ms.com> - 2012-02-29 09:44 +0100
Re: opening isdn connection with external file Lew <noone@lewscanon.com> - 2012-02-29 00:48 -0800
Re: opening isdn connection with external file nescafe <nc@ms.com> - 2012-02-29 11:40 +0100
Re: opening isdn connection with external file Lew <noone@lewscanon.com> - 2012-02-29 10:06 -0800
Re: opening isdn connection with external file nescafe <nc@ms.com> - 2012-03-02 11:08 +0100
Re: opening isdn connection with external file Lew <noone@lewscanon.com> - 2012-03-02 02:32 -0800
csiph-web