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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:09:04+00:00 2026-05-15T03:09:04+00:00

Here is a challenging question! Let me first tell you my scenario how am

  • 0

Here is a challenging question!

Let me first tell you my scenario how am i implementing a solution to a problem.

I am reading a log file and displaying it on the JTextArea. Log file is cp037 character coded. I was reading each file as a byte stream or byte array from the log file & displaying it. Anyways, i managed to display the text properly in JTextArea by cp037 character coding.

Now, User may select a set of characters in the JTextArea. All i want is the position of first character of the user’s selected text, from a nearest special character ‘+'(its character code in cp037 is 4E), which is prior to the selected text. This character may occur at several places in the JTextArea.

In simple sentence, i want the first character location(of user selected text) from nearset ‘+’ which should be occuring prior to the user’s selected text.

PS: cp037 is a type of character encoding scheme which is created by IBM & used for IBM Mainframes.

Please fell free to ask me if the question is not clear…:->

  • 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-15T03:09:05+00:00Added an answer on May 15, 2026 at 3:09 am

    JTextComponent has a method

    public int getSelectionStart()
    

    Returns the selected text’s start position. Return 0 for an empty document, or the value of dot if no selection.

    public String getSelectedText()
    

    Returns the selected text contained in this TextComponent. If the selection is null or the document empty, returns null.

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

Sidebar

Related Questions

I am working on a challenging problem : finding a solution to get data
here is a challenging question for a javascript expert and/or someone who has worked
Here is the scenario. I'm writing my geo-ruby oracle adapter for Ruby On Rails
I have a bit of a challenging problem. I'm using the Blogger JSON API
This problem is a challenging one. Our application allows users to post news on
The question I am about to ask could be somewhat challenging. I will try
Here I am facing one more challenging issue and as usual turning on this
Friends, I have a question here. I'm developing an VS2010 - MVC 3 Application
This is a bit challenging but fun question. Consider having these tables tweets tweet_id
I find the ICU docs somewhat challenging. My question is: How do I normalize

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.