• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to write functions for MenuItems

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic