CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    103

    How could I open a chm file in java application?

    I want to click on a menuItem or Button and then chm file is opened, just like I open it in Windows OS.

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163
    To open a file for reading from a menu or button, add an ActionListener to the control and in the actionPerformed(...) method, pass the full file name (and path if necessary) to the constructor of FileInputStream. You can then read bytes from this stream, or pass it to other java.io classes to read in other ways.


    Too many cooks make too much soup...
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured