Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #18436

Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Eric Sosman <esosman@ieee-dot-org.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox
Date Thu, 30 Aug 2012 13:18:33 -0400
Organization A noiseless patient Spider
Lines 42
Message-ID <k1o79c$soj$1@dont-email.me> (permalink)
References <e56859b3-9877-441e-9ad4-722ed744c8de@googlegroups.com> <9d55a43a-4981-45a5-b5e1-ac492ea60c8b@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Thu, 30 Aug 2012 17:18:36 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="ffb8f7085759b339c1002252b48331a4"; logging-data="29459"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/woApjrWzaT5RcXL7fL91R"
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120824 Thunderbird/15.0
In-Reply-To <9d55a43a-4981-45a5-b5e1-ac492ea60c8b@googlegroups.com>
Cancel-Lock sha1:QTn9RY9Xernon3or5auotG2pBho=
Xref csiph.com comp.lang.java.programmer:18436

Show key headers only | View raw


On 8/30/2012 11:57 AM, clusardi2k@aol.com wrote:
> So, is everyone in agreement that the warning can be prevented by modifying the definition of the jcombobox and and not in this "additem".
>
> I created the jcombobox in NetBeans by dragging it from the swing palette. The definition for it is in code produced by NetBeans and I can't modify.
>
> What do I do.
>
> Below is the code that I can't change;
>
>      private void initComponents() {
> ...
>         jComboBox6 = new javax.swing.JComboBox();
> }

     In the NetBeans form editor, select the JComboBox.  In the
Properties panel, click the Code tab.  Open the Type Parameters
editor, enter <String> in the box, and close.

> Thank you,

     It seems to me that you are having more trouble with the
NetBeans form designer and its artifacts than with Java and
Swing.  The designer is an intricate beast, with little controls
and menus and twiddly bits festooned all over the landscape, to
the extent that I imagine it might take most of a year's solid
effort to master the complexity.  Someone with that mastery
could probably churn out forms faster than someone just typing
Java code -- but the typist has several months' head start while
the other guy is learning how to use the designer.

     If you expect to be doing a LOT of form designing, by all
means spend the time to learn the form designer inside and out.
But if you just want a simple form or three, skip the designer:
It will just get in your way (as it seems to be doing now).  If
you're having trouble achieving some particular effect you might
create a mock-up in the designer and study the generated code to
get ideas, but I truly think you'll get to a better outcome sooner
by writing the Java code yourself.

-- 
Eric Sosman
esosman@ieee-dot-org.invalid

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox clusardi2k@aol.com - 2012-08-30 08:03 -0700
  Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox Jeff Higgins <jeff@invalid.invalid> - 2012-08-30 11:31 -0400
    Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox sameer k <sameer12982@gmail.com> - 2012-09-06 14:21 -0700
  Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox Shyam <shyam.k.kotnana@gmail.com> - 2012-08-30 08:38 -0700
  Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-30 11:40 -0400
  Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox Jeff Higgins <jeff@invalid.invalid> - 2012-08-30 11:52 -0400
  Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox Jeff Higgins <jeff@invalid.invalid> - 2012-08-30 12:08 -0400
    Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox Jeff Higgins <jeff@invalid.invalid> - 2012-08-30 12:09 -0400
  Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-30 13:18 -0400
  Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox Roedy Green <see_website@mindprod.com.invalid> - 2012-09-02 14:06 -0700
  Re: How to eliminate warning: unchecked call to additem(E) java as a member of the raw type javax.swing.JComboBox Roedy Green <see_website@mindprod.com.invalid> - 2012-09-03 18:14 -0700

csiph-web