Results 1 to 4 of 4
  1. #1
    hreodbeohrt is offline Member
    Join Date
    Oct 2011
    Posts
    4
    Rep Power
    0

    Default JList raw datatype ...?

    Hey!

    Been watching some java tutorials online, and recently watched one about JList.

    TheNewBoston – Free Educational Video Tutorials on Computer Programming and More! » Java Programming Tutorial – 72 – Multiple Selection List

    When I write this code, eclipse gives me a warning that JList is a raw datatype and should be parameterized.
    The same goes for the setListData method which is being used there.

    How can I solve this ? I´ve started reading up on generic datatypes, but coulnd´t find any solution to my problem yet.

    Thanks ! :)

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,311
    Blog Entries
    7
    Rep Power
    20

    Default Re: JList raw datatype ...?

    Can you show us some code? Because (as far as I know) the JList class isn't a parameterized class (a 'generic' class) ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    hreodbeohrt is offline Member
    Join Date
    Oct 2011
    Posts
    4
    Rep Power
    0

    Default Re: JList raw datatype ...?

    Thanks for the reply!

    Well, my eclipse tells me so.
    Here is some code: [Java] Jlist - Pastebin.com
    getSelectedValues has also been deprecated, and I have not yet been able to find something to take its place.

    Thanks

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: JList raw datatype ...?

    Quote Originally Posted by hreodbeohrt View Post
    Thanks for the reply!

    Well, my eclipse tells me so.
    Here is some code: [Java] Jlist - Pastebin.com
    getSelectedValues has also been deprecated, and I have not yet been able to find something to take its place.
    This is a new change for Java 7 -- generic JLists. You can just ignore the warning if you so desire, or else use a generic version of the JList.

Similar Threads

  1. Datatype of a class?
    By Skipito in forum NetBeans
    Replies: 5
    Last Post: 10-12-2011, 07:04 PM
  2. char datatype
    By frejon26 in forum New To Java
    Replies: 5
    Last Post: 05-04-2010, 11:21 PM
  3. how to find a datatype
    By hasysf in forum New To Java
    Replies: 1
    Last Post: 09-06-2009, 10:41 AM
  4. Problem in using Object datatype
    By mfaizan24 in forum New To Java
    Replies: 6
    Last Post: 05-05-2009, 11:51 PM
  5. Problems with a complex datatype in a webservice
    By lichtbringer in forum Web Frameworks
    Replies: 2
    Last Post: 10-29-2008, 05:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •