I have two text area on the screen, I can make bold the different words between two text areas and I want to have for up and down to go the different words helping this button on the text areas. how can I do that?

Recommended Answers

All 6 Replies

what do you mean by:

and I want to have a button up and down to go the different words helping this button on the text areas.

Are you asking how to have one button that when pressed will select the next word towards the top of the list of words and another button that will select the next word towards the bottom of the list?

Are you asking how to have one button that when pressed will select the next word towards the top of the list of words and another button that will select the next word towards the bottom of the list?

yes you are right?

You will need to add action listeners to the buttons. The listener code will need the logic to move the selection to the next word in the list as determined by which button was pressed.

Can I use keyEvent for this when I use up or down key, its gonna show the next different word?

Are you using JButtons on your GUI to control the action
or are you going to use the keyboard up & down arrows?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.