Results 1 to 6 of 6
  1. #1
    *Java* is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default How Can I Set The Position Of External Program?

    hi all
    how can i set the position of external program in java
    like: when i run a microsoft word ".doc" file throw Java , i want the word window in left corner.

    thanks

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by *Java* View Post
    how can i set the position of external program in java
    like: when i run a microsoft word ".doc" file throw Java , i want the word window in left corner.
    Please add more details regarding your problem, because as asked with the skimpy amount of information you've provided, I'm not sure that your question is answerable. For example, what do you mean by "when i run a microsoft word ".doc" file throw Java , i want the word window in left corner."? This statement doesn't make sense.

  3. #3
    milovan is offline Senior Member
    Join Date
    Jan 2011
    Location
    Belgrade, Serbia
    Posts
    301
    Rep Power
    4

    Default

    I think he means through java... And he wants to place Word's window at particular position after opening it.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by milovan View Post
    I think he means through java... And he wants to place Word's window at particular position after opening it.
    Ah, thanks for the translation as I didn't think of that! I don't know that Java can do this directly, but it certainly can be done indirectly say by having Java call a small AutoIt script that does this.

  5. #5
    *Java* is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default

    Java Code:
             String s = "C:/X.doc";
              BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
             
              File f = new File(s);
                Desktop desktop = null;
              if (Desktop.isDesktopSupported())
                  desktop = Desktop.getDesktop();
              desktop.open(f);
    as milovan said
    if i run this code .. the woindow will in full screen
    i want the woindow of the word after the opening be in certain place ( x,y postions )

  6. #6
    honnza is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default

    It seems to me from the documentation that what you request is not possible using the java.awt.desktop API, if that is possible at all (console desktop, e.g.)

Similar Threads

  1. Execute external program from java
    By ankitmcgill in forum New To Java
    Replies: 1
    Last Post: 06-01-2009, 04:58 AM
  2. Executing an external java program
    By arunsubramanian in forum Advanced Java
    Replies: 5
    Last Post: 02-06-2009, 08:49 AM
  3. Replies: 0
    Last Post: 04-04-2008, 03:40 PM
  4. Replies: 0
    Last Post: 10-04-2007, 10:33 PM
  5. Use a external file in my program
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:28 AM

Posting Permissions

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