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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:15:50+00:00 2026-06-19T02:15:50+00:00

Is it possible to highlight a substring inside of a TableView Cell in JavaFX

  • 0

Is it possible to highlight a substring inside of a TableView Cell in JavaFX 2 by giving the substring another color for example? If yes, how is this achievable?

Glad for any advice!

  • 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-19T02:15:52+00:00Added an answer on June 19, 2026 at 2:15 am

    One possible solution for Java7. Use a cell factory for your cell. From the factory return a TextField. Set the TextField to not editable. Use the TextField’s methods to select the text you want to highlight (might need a Platform.runLater method to do that and the field might need to be focused to allow to select the text). Once the selection is complete (and really displayed), Disable mouse input and focus traversion on the TextField so that the user can’t change the selection maybe also in a Platform.runLater.

    For Java8, you can do the similar thing, but instead of a TextField, use a TextFlow and style the subtext in the text flow using css or Java APIs.

    If you just want to highlight all of the text in the cell, rather than some portion of it, then you can just use a standard Label plus css styling. Another solution for partial text highlighting is to use a FlowPane with multiple labels inside and different styling for each.

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

Sidebar

Related Questions

Is it possible to highlight a cell, let's say red, with certain criteria. One
Possible Duplicate: Find the JTable cell and paint it This is my Rectangle class
In windows application, I'm using a datagridview. Is that possible to highlight color for
Is it possible to change the highlight color (shown when the showsTouchWhenHighlighted property is
Possible Duplicate: jquery highlight the link when clicked I have this nav: <div id=nav>
Possible Duplicate: Windows 7 Tasbar Icons Highlight Color Windows 7 uses some algorithm to
Is it possible to highlight table row on hover (something like this ) using
Possible Duplicate: zebra stripes over riding my highlighting color I am using this code
Possible Duplicate: Highlighting Strings in JavaFX TextArea how to highlight the text in the
Is it possible to highlight the search term in returned search results? For example:

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.