#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2008
    Posts
    22
    Rep Power
    0

    How to make Java write to a NEW browser window


    Hi experts,

    I have a program that writes its output to an html file.

    I have the program check to see if there is supported browser and then the code (currently used) opens a browser window for writing like this . . .

    desktop.browse(new URI(URL));

    . . however, the problem is that if there is a browser window already open, then this will open a new tab in that browser window and then writes the output there.

    I would prefer that the program would always open a new browser window.

    I have looked at . . .

    java.sun.com/javase/6/docs/api/java/awt/Desktop.html

    . . however it does not help. In fact I am having a hard time finding any documentation about how to have Java write to html files.

    So, any help or guidance would be very much appreciated.

    Thanks,
    dbwillo
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    115
    Rep Power
    29
    You may want to re-think your design.... Why do you want to do this? It should probably be the user's choice about how their web browser handles new pages.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2008
    Posts
    22
    Rep Power
    0
    Originally Posted by tdennist
    You may want to re-think your design.... Why do you want to do this? It should probably be the user's choice about how their web browser handles new pages.

    Actually, that is exactly why I am trying to learn how to make this change.

    Based on feedback, from the users of this program, some of them prefer that the program open a new, separate browser window when it displays the output.

    So, once I figure out how to do this, then I will give the users the option of either choice.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2008
    Posts
    22
    Rep Power
    0


    So, is the question not clear?

    Or, should I be asking this question in the HTML Forum?

    Again, I would really appreciate any help.

    Thanks,
    dbwillo

IMN logo majestic logo threadwatch logo seochat tools logo