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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:03:12+00:00 2026-05-15T08:03:12+00:00

I am in project where we are building a simple web calendar using Java

  • 0

I am in project where we are building a simple web calendar using Java EE technologies.

We define a table where every row is an employee, and every column represents an hour interval. The table width and column widths are adjustable. In every cell we have a text retrieved from a database, indicating what the employee is doing / should do in that time interval.

The problem is that sometimes the text in cells is getting bigger than the actual cell.
My task is to make the text more “readable” by reducing it’s length in a “smart way” so that it can fit in the cell more “gracefully”.

For example if initially in a cell I have: “Writing documents”, after the resize I should retrieve: “Wrtng. dcmnts” or “Writ. docum.” so that the text can fit well.

Is there a smart way to do it ? Or removing vocals / split the string in two is enough ?

  • 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-05-15T08:03:12+00:00Added an answer on May 15, 2026 at 8:03 am

    If you are not able to store abbreviations you’re probably going to get stuck with some rules such as:

    if the string is too long
      remove the two rightmost vowels and append a .
      do while the string is too long and there are any vowels left
         remove vowels one at a time from the right
      do while the string is too long
         remove a consonant from the right end of the rightmost word
         if the string is still too long
             remove a consonant from the last word but one
             ...
    

    You get the picture, it’s fiddly but not rocket science.

    You could combine this with a set of rewrite rules for common words and for common groups of letters. For example:

    customer -> custmr -> cust -> cst
    ation -> tn
    

    I suspect applying rules first, then an abbreviating algorithm will give more pleasing results.

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

Sidebar

Related Questions

I am building a simple Android project in eclipse that uses the google-api-java-client .
I'm building a project using a GNU tool chain and everything works fine until
I am building a project using Visual Studio. The project has a dependency on
I am building a simple Scala project with SBT 0.11. All the code files
I'm building a game project where there are simple container objects that can have
I'm building web app that needs to communicate with another application using socket connections.
Currently I'm building a simple page for project hosting, and now I've got a
I am building a simple ajax chat client for a school project and have
Building a proof-of-concept web site for a group project. Regarding usernames we would like
I'm building a web page screen capture application for an internal R&D project. Environment:

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.