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 secon开发者_JAVA技巧d text box?
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.
精彩评论