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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:53:57+00:00 2026-06-10T18:53:57+00:00

I want to colour the same cell of a table using 2 colours. I

  • 0

I want to colour the same cell of a table using 2 colours. I still have to display some text in the cell also and I want to do it by keeping the current structure.

I’ve tried with labels, panels, but I can’t get it to work properly. Also, the colours have to updated based on the status on the cell (update the colour of the first half while keeping the colour of the second one).

  • 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-10T18:53:58+00:00Added an answer on June 10, 2026 at 6:53 pm

    You can write your own extension of a Component / JPanel that knows how to display a text and knows how to paint the background in 2 colors.
    This would mean that you have to overwrite paint or paintComponent in your custom component.

    Then, the getTableCellRendererComponent would return instances of this custom component.

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

Sidebar

Related Questions

I have the following css code .container { width:800px; background-color:yellow; margin:auto; display:table; } .cell
I have a large table to display and enter data. Each cell contains one
I have two tables and I want to highlight a cell in table 1
I have an SVG map of the world, and I want to colour each
I want to find the most used colour in an image using python. for
I am using LINQ to SQL (SQL Server) with C#. I have a table
I want to change the background colour of a cell inside UITableView from default
I want the pink and blue boxes to have the same height (400px), which
I want my headers (h1 through h6) to have a background colour (different to
I need to change background color of single cell in table using java script.

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.