开发者

loading multiple files using the options from menu bar in java

开发者 https://www.devze.com 2023-04-12 22:06 出处:网络
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 te

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

精彩评论

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