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 8644329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:16:03+00:00 2026-06-12T12:16:03+00:00

I have a JComboBox of type myclass . I use CustomListRender to display one

  • 0

I have a JComboBox of type myclass. I use CustomListRender to display one of the attributes of myclass, and it works fine.

Then I set myCombobox.setEditable(true). JComboBox becomes editable, but by default text is set to somthing like this in combobox:

 com.mypackagename.myclass

Can anyone tell me how to solve this problem?

Thanks in advance.

  • 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-12T12:16:05+00:00Added an answer on June 12, 2026 at 12:16 pm

    As discussed in How to Use Combo Boxes: Providing a Custom Renderer,

    The default renderer knows how to render strings and icons. If you put other objects in a combo box, the default renderer calls the toString method to provide a string to display.

    Unless overridden, you’re probably seeing the toString() implementation inherited from Object. At a minimum, you’ll need to override MyClass#toString() or update your renderer supply a custom editor accordingly; there’s a related example here. Most would prefer the latter; your sscce showing your custom renderer would make it easier to suggest alternatives.

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

Sidebar

Related Questions

I have a Swing JComboBox with an InputVerifier set correctly. I am using the
I have a JTable with two columns and both are JComboBox, for this purpose
I do have a strange focus problem when using a JComboBox inside an embedded
I have a little problem. I had some JComboBox to a JDialog but they
I have a combobox whose value I want to use with a SQL WHERE
I have a jcombobox which values come from a list. I want to first
I have a Utils class such that: public static void setComboBoxDefaultWidth(JComboBox cb) { cb.setPrototypeDisplayValue(mmmmmmmmmmmmmmmmmmmmmmmmmm);
Let's say you have a JPanel size 200 x 200, with a custom combo-box-type
When I make selection in ComboBox, and then type some text in TextBox, I
I cant get rid of one new typesafety warning in java7. I have the

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.