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

  • Home
  • SEARCH
  • 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 8125143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:42:56+00:00 2026-06-06T06:42:56+00:00

I tried to add JRadioButton into JTable by using CellEditor and CellRenderer , but

  • 0

I tried to add JRadioButton into JTable by using CellEditor and CellRenderer, but I can’t add JRadioButton into JTable. I am using NetBeans and backend MySQL. Please help me.

Edit: Thank you, but I have no idea about how to group JRadioButton. Can you help me?
I have 4 columns .First column cell containing item name , second column cell containing quantity,3rd and 4th column cells contiaining JRadio Buttons.Then I want to grouping 3rd and 4th column cells containing JRadio Buttons in each row

Edit:If I try to add radiobutton in the customize code of jTable by using this,

new JRadioButton("a") , then it’l come as, javax.swing.JRadioButton[,0,0,0x0,invalid,alignmentX=0.0,.....text=a], in the column instead of button

  • 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-06T06:42:58+00:00Added an answer on June 6, 2026 at 6:42 am

    It’s not clear how you want to use JRadioButton in a JTable; consider these alternatives:

    • Use SINGLE_SELECTION mode to select individual rows.

      table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      
    • Use a column of type Boolean.class, which will be rendered using a JCheckBox. This example limits selections to a single row.

    • Use a JComboBox as an editor for mutually exclusive choices within a row.

    • Addendum: If JRadioButton is required, they can be added to a JPanel, as shown in this example due to @mKorbel.

    • Addendum: If each JRadioButton has its own column, you can’t use a ButtonGroup because a single button is used for all cells having the same renderer. You can update other button(s) in the same row from your TableModel, which should override setValueAt() to enforce the single-selection rule that is usually managed by the ButtonGroup. There’s an example here.

    • Addendum: This example due to @Guillaume Polet illustrates a way to manage one radio button per row.

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

Sidebar

Related Questions

I've tried to add mapping classes manually, by using multiple .Mappings extension calls, but
I tried to add search fields in Django using python. Followings are the codes
I've tried the add() method but nothing is displayed when I try to add
Please, help me get distinct result by certain field. I tried go by the
How can I enable Show-Paren mode only for *.el files? I have tried (add-hook
I tried some add to favorties JavaScript scripts.. With IE8, I get an access
I tried to add buttons, textboxes and text to tableview. I want the row
I tried to add a merge strategy to my .gitattributes file in my repository.
I tried to add a facebook share link to a jekyll bootstrap page, however
When I tried to add a connection it is showing the following error as

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.