• Post Reply Bookmark Topic Watch Topic
  • New Topic

GUI help  RSS feed

 
Gregory Prescott
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have to create a GUI to represent highlighted text in a text field. I have created my object but I have no idea how to highlight sections in relevance to my highlighted text

can anyone offer advice many thanks

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're using a JTextComponent to display the text (like a JTextArea), then you can use a javax.swing.text.Highlighter for specific text ranges.
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
Gregory Prescott
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:If you're using a JTextComponent to display the text (like a JTextArea), then you can use a javax.swing.text.Highlighter for specific text ranges.


thankyou ill try and see if I can implement it

and Thankyou hello to everyone
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!