Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #5003
| From | Knute Johnson <nospam@knutejohnson.com> |
|---|---|
| Newsgroups | comp.lang.java.gui |
| Subject | Re: What do these errors mean? |
| Date | 2012-02-12 08:55 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <jh8qta$b16$1@dont-email.me> (permalink) |
| References | <4f37e5ef$0$2478$db0fefd9@news.zen.co.uk> |
On 2/12/2012 8:16 AM, 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
>
> 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
>
> Vectorine.java:68: warning: [unchecked] unchecked call to addItem(E) as
> a member of the raw type JComboBox
> droplist.addItem("Compare to what?");
> ^
> where E is a type-variable:
> E extends Object declared in class JComboBox
>
> Vectorine.java:71: warning: [unchecked] unchecked call to addItem(E) as
> a member of the raw type JComboBox
> droplist.addItem("Other planet");
> ^
> where E is a type-variable:
> E extends Object declared in class JComboBox
>
> Vectorine.java:143: warning: [static] static method should be qualified
> by type name, DatasetReader, instead of by an expression
> datareader.getPlanetPositions(planet);
> ^
> Vectorine.java:145: warning: [static] static variable should be
> qualified by type name, DatasetReader, instead of by an expression
> for (int count=0; count<datareader.planetPositions.length; count++)
> ^
>
> Vectorine.java:21: warning: [serial] serializable class Vectorine has no
> definition of serialVersionUID
> public class Vectorine extends JFrame implements ItemListener,
> MouseListener
> ^
> ----------------------------------------------
> (DatasetReader is another class in my program, which the main class
> creates an instance of so it can use its methods to look up data.
> Anything else I should explain, just tell me.)
> --
> Many thanks,
> A. B.
>> <>
> My e-mail address is zen177395 at zendotcodotuk, though I don't check
> that account very often.
> Post unto others as you would have them post unto you.
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)
--
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