• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to write functions for MenuItems

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i have a small problem how do i write a function for MenuItem open in file menu for a menu bar.
Do I have yo design entire code for open i.e suppose when we
use open menuitem in say browser the window which we get . that is exactly what i want...
please help me
wating eagerly for reply

------------------
kainji
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kainjan,
if u r using JEditorPane/JTextPane to show the contents then all u have to do is use the function
editorpane.setPage("path to your file");
else if u r using JTextArea to show the contents of your file then u need to open a FileStream read the contents of file concatenate it in to a String and then use
textarea.setText(string);
regards
Deekasha




[This message has been edited by deekasha gunwant (edited December 25, 2000).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!