Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!feeder3.eweka.nl!81.171.88.15.MISMATCH!eweka.nl!lightspeed.eweka.nl!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.gui Subject: Re: What do these errors mean? Date: Sun, 12 Feb 2012 09:07:26 -0800 (PST) Organization: http://groups.google.com Lines: 34 Message-ID: <354004.591.1329066446641.JavaMail.geo-discussion-forums@pbcwt9> References: <4f37e5ef$0$2478$db0fefd9@news.zen.co.uk> NNTP-Posting-Host: 173.164.137.214 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1329066447 30492 127.0.0.1 (12 Feb 2012 17:07:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 12 Feb 2012 17:07:27 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:5004 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 > > 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 box = new JComboBox(String[] items) Or, since it's Java 7, JComboBox 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.) -- Lew