Question

I have developed an editor using java Jpanel, component, etc....I have 2 text areas in the editor. When i choose open a file option from the menubar i'm able to load the content of the file to one textarea. But how can i add another option to the menu bar to load the content of another file to the second text box?

Was it helpful?

Solution

You can add two menu items, passing a reference to the desired destination text area to each Action. Alternatively, depending on your design, add a single menu item whose Action alternates between the two destination text areas.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top