Variable
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Variable

  1. #1
    Join Date
    Dec 2002
    Location
    Norman, OK
    Posts
    4

    Variable

    I have created a web browser in Java. The program allows the user to enter a website address which will be their "home page." How can I store their entry in a variable and not lose it when they close program so that when they run the program again, the page that comes up will automatically display the website they entered?

    (If anyone has the code to a cool web browser that would be even better)

    Thanks,
    Denver

  2. #2
    Join Date
    Jan 2002
    Location
    Halifax, NS, Canada
    Posts
    985
    Write it to a File.

    Here's a good tutorial on File IO, and one on file streams.

    http://java.sun.com/docs/books/tutorial/essential/io/
    http://www.ictp.trieste.it/~manuals/...lestreams.html

  3. #3
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163
    The Properties class allows you to load and save a properties file (a list of key strings and associated value strings).
    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center