Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #5005
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Knute Johnson <nospam@knutejohnson.com> |
| Newsgroups | comp.lang.java.gui |
| Subject | Re: What do these errors mean? |
| Date | Sun, 12 Feb 2012 09:17:01 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 40 |
| Message-ID | <jh8s6d$l3i$1@dont-email.me> (permalink) |
| References | <4f37e5ef$0$2478$db0fefd9@news.zen.co.uk> <jh8qta$b16$1@dont-email.me> <354004.591.1329066446641.JavaMail.geo-discussion-forums@pbcwt9> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sun, 12 Feb 2012 17:17:01 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="mz/LDSJwiWnk3Jnnqg7x+Q"; logging-data="21618"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jnTlSbGvzkGdY9tOACa5j" |
| User-Agent | Mozilla/5.0 (Windows NT 5.1; rv:10.0) Gecko/20120129 Thunderbird/10.0 |
| In-Reply-To | <354004.591.1329066446641.JavaMail.geo-discussion-forums@pbcwt9> |
| Cancel-Lock | sha1:mqxZijmOIiFQBXpgaL9D83nSW8A= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.gui:5005 |
Show key headers only | View raw
On 2/12/2012 9:07 AM, Lew wrote: > Knute Johnson wrote: >> A B wrote: >>> I've finally got around to compiling my program with -Xlint, as the >>> compiler kept nagging me to. This is what I got. (I've removed some >>> entries for different bits that caused identical errors.) I haven't a >>> clue what any of it means or what to do about it; can anyone enlighten >>> me? What's a raw type, for instance, and what's a serializable class and >>> how do you give it a definition of serialVersionUID? >>> ---------------------------------------------- >>> Vectorine.java:39: warning: [rawtypes] found raw type: JComboBox >>> JComboBox droplist = new JComboBox(); >>> ^ >>> missing type arguments for generic class JComboBox<E> >>> where E is a type-variable: >>> E extends Object declared in class JComboBox > ... > >> I can tell you are using Java 7, JComboBox has changed to a generic >> class. The simple answer is if you are creating a JComboBox of Strings, >> declare it thus; >> >> JComboBox<String> box = new JComboBox<String>(String[] items) > > Or, since it's Java 7, > > JComboBox<String> box = new JComboBox<>(items) > > (The 'String[]' in an invocation is an error. It is useful to show a possible > type for the argument, but is not compilable as such. So, "A B", be sure to vet > any code before blindly copying and pasting. Usenet code posts are often, as > above, actually pseudocode.) > True, I pulled it from the Docs, and I did forget that you don't need to specify the type on the right. -- Knute Johnson
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar
What do these errors mean? "A B" <@bleBaker.uk> - 2012-02-12 16:16 +0000
Re: What do these errors mean? Lew <lewbloch@gmail.com> - 2012-02-12 08:54 -0800
Re: What do these errors mean? Knute Johnson <nospam@knutejohnson.com> - 2012-02-12 08:55 -0800
Re: What do these errors mean? Lew <lewbloch@gmail.com> - 2012-02-12 09:07 -0800
Re: What do these errors mean? Knute Johnson <nospam@knutejohnson.com> - 2012-02-12 09:17 -0800
Re: What do these errors mean? Roedy Green <see_website@mindprod.com.invalid> - 2012-02-13 07:47 -0800
Re: What do these errors mean? "A B" <@bleBaker.uk> - 2012-02-16 20:50 +0000
Re: What do these errors mean? Lew <lewbloch@gmail.com> - 2012-02-16 13:01 -0800
Re: What do these errors mean? "A B" <@bleBaker.uk> - 2012-02-16 21:44 +0000
Re: What do these errors mean? Jeff Higgins <jeff@invalid.invalid> - 2012-02-16 17:54 -0500
Re: What do these errors mean? "A B" <@bleBaker.uk> - 2012-02-17 18:21 +0000
Re: What do these errors mean? Roedy Green <see_website@mindprod.com.invalid> - 2012-02-17 15:36 -0800
csiph-web