Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8663939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:07:04+00:00 2026-06-12T17:07:04+00:00

Eclipse IDE showing error on Jcombobox which says that JcomboBox can’t be parametarized eg

  • 0

Eclipse IDE showing error on Jcombobox which says that JcomboBox can’t be parametarized
eg :something like line showing below

private final JComboBox<LaborHelper> labourname = new JComboBox<LaborHelper>();

here my project execution environment is javaSE1.6

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:07:05+00:00Added an answer on June 12, 2026 at 5:07 pm

    Look at the java 1.6 documentation for JComboxBox, the class JComboxBox is not a generic class for Java 1.6.

    It takes an array or a vector of objects as choices for the users and displays them by calling the toString method of the objects (so you have to override it if you want to customize the labels).

    To access the value that the user selected, you will have to cast the selected item as follows:
    (LaborHelper)labourname.field.getSelectedItem()

    However, this should work with java 1.7+ as JComboxBox became a generic class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there anyplace in the eclipse ide that I can enter immediate code while
I have develop android application using Android SDK, Eclipse IDE.In that some times showing
Is anyone able to use Scala IDE in Eclipse with syntax highlighting showing different
In eclipse IDE, how can I see the javascript source code GWT has generated
Using Eclipse IDE. The line: getClass().getResource(/res/bitmaps/image.png); returns null . I have created the res
I'm using Eclipse IDE and I have the following line in my code: import
I have Eclipse IDE for Java EE packages installed. How can I add the
I use eclipse IDE for developing my GWT and android apps. I would like
For some reason in Eclipse my Referenced Libraries is showing up as com.android.ide.eclipse.adt.LIBRARIES this
The Eclipse IDE has a nice feature that automatically logs file revisions and you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.