开发者

loading multiple files using the options from menu bar in java

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜