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

The Archive Base Latest Questions

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

I have a JTable in which 1 column contains 3 radiobuttons per cell mgrdData.getColumnModel().getColumn(intCol).setCellRenderer(new

  • 0

I have a JTable in which 1 column contains 3 radiobuttons per cell

mgrdData.getColumnModel().getColumn(intCol).setCellRenderer(new RadioButtonRenderer());
RadioButtonEditor butEdit = new RadioButtonEditor(new JCheckBox());
mgrdData.getColumnModel().getColumn(intCol).setCellEditor(butEdit);

This works fine as the radiobuttons are shown, and the correct ones are selected.

However the radiobuttons are too large to be completely visible, so I would like to reduce the height of the radiobuttons.

I tried changing the fontsize, as well as .setSize(), but that didn’t have any effect on the height of the radiobutton.

After searching a lot, all I could find was the following :

btnVA.putClientProperty("JComponent.sizeVariant","mini");
btnUIT.putClientProperty("JComponent.sizeVariant","mini");
btnAAN.putClientProperty("JComponent.sizeVariant","mini");

where btnVA, btnUIT, and btnAAN are the radiobuttons in my RadioButtonRenderer.

If you want to see some more code let me know, and I will edit it in.

Is there anything special I should add to make the radiobuttons apply this ClientProperty?

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

    I had overlooked that this code required the Nimbus LookAndFeel.

    For easier testing with various LookAndFeels i created a function which I call in the init() of my Applet :

    private void setLaF()
    {
      try
      {
        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels())
        {
          if ("Nimbus".equals(info.getName()))
          {
            UIManager.setLookAndFeel(info.getClassName());
            break;
          }
        }
      } catch (Exception e)
      {
          // If Nimbus is not available, you can set the GUI to another look and feel.
      }
    }
    

    After calling this function, the radiobuttons do behave, and change their height accordingly

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

Sidebar

Related Questions

I have a JTable which contains a one column, cell render of each table
I have a JTable . One column holds a JPanel which contains some JLabels
Hi I an issue with editors in a JTable. I have a column which
I have a JTable with 3 column of which first column is a button
I have jFrame2 which contains jTable with 4 columns (the jTable taking data from
I have a JTable . I want to know which row and column are
I have a JTable of which one column is pre-filled with 30min time slots
I am quiet new to Swing. I have a JTable in which images are
I have a JTable which I want to have left-click and right-click JPopupMenu on
I have a JTable on which Components can be dropped. Some of those components

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.