Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Re: text color changer based on words/ word classification by color

    What problem are you trying to solve?
    There are two different solutions posted earlier in the thread.
  2. Re: text color changer based on words/ word classification by color

    I think for a student I'd leave the regex for version 2. Keep it simpler for version 1.
    For example after indexOf() finds the word, verify that the char before and the char after is a terminating...
  3. Re: text color changer based on words/ word classification by color

    Nice job dlorde!


    Using JTextPane moves the difficulties further on to the output step.
    The JTP handles word wrap and can be in a JScrollPane to allow for longer text. Setting the color for a...
  4. Re: text color changer based on words/ word classification by color

    Sorry, I don't understand your question. What is a "reterns"?
    To find where the words that are colored are located, you'd need to save their location as you colored them
  5. Re: text color changer based on words/ word classification by color

    Yes, I think that could be done. I'm experimenting with the JTextPane (JTP) class as a possibility for your project.
    The way it works is:
    You add text to the JTP
    When you want to color a word,...
  6. Re: text color changer based on words/ word classification by color

    That what HTML is made up of: Strings of text.
  7. Re: text color changer based on words/ word classification by color

    Sounds like HTML
  8. Re: text color changer based on words/ word classification by color

    The coloring controls for the text being displayed would be around somewhere that you could read and use when you create the HTML.
    I've never done this, so I'm not sure where they would be.
  9. Re: text color changer based on words/ word classification by color

    I understand the first part, but not this part.
    What is the output to look like? How are the colored words to be represented?
    If you output the text with markup like HTML then the coloring could...
  10. Re: text color changer based on words/ word classification by color

    There are different ways to scan a String. One is to use delimiters and you seem to be thinking to use a comma.


    here you are running ahead and thinking of how you are going to implement some of...
  11. Re: text color changer based on words/ word classification by color

    Start with small bits and add to it as you go.

    Do what?
    Please explain what adding commas will do for your problem.
  12. Re: text color changer based on words/ word classification by color

    What have you coded so far?
    Look at the JEditorPane class as a way to have different lines in different colors.
Results 1 to 12 of 12