Results 1 to 11 of 11
  1. #1
    JG4m3r is offline Member
    Join Date
    Mar 2012
    Posts
    16
    Rep Power
    0

    Question Program in foreground

    Hi guys, I am currently trying to make a program that displays in front of everything else, and does not allow the user to do anything else before the program is finished/closed. Just like an update, or error message. Does any of you guys know?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,587
    Rep Power
    25

    Default Re: Program in foreground

    The Window class has a method to keep the window on top.
    The rest of your requirements would make a lot of people mad and require some cooperation from the OS.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    JG4m3r is offline Member
    Join Date
    Mar 2012
    Posts
    16
    Rep Power
    0

    Default Re: Program in foreground

    Quote Originally Posted by Norm View Post
    The Window class has a method to keep the window on top.
    The rest of your requirements would make a lot of people mad and require some cooperation from the OS.
    The whole point of the program is to make sure that my brother does not steal the computer while I am doing something else. This means that the program must not let him do anything on the computer without closing down the program, which is done by entering a correct password.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,587
    Rep Power
    25

    Default Re: Program in foreground

    Java can't do that.
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    Join Date
    Apr 2012
    Location
    Long Island, NY
    Posts
    6
    Rep Power
    0

    Default Re: Program in foreground

    In the visual editor set the alwaysOnTop option to true/checked

  6. #6
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    760
    Rep Power
    8

    Default Re: Program in foreground

    You can just lock your computer and do something else :)

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: Program in foreground

    Quote Originally Posted by cristian.rivera View Post
    In the visual editor set the alwaysOnTop option to true/checked
    1. Norm already hinted at the API method for that.
    2. Nothing in the thread implies that the OP uses NetBeans or its advanced tools.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  8. #8
    JG4m3r is offline Member
    Join Date
    Mar 2012
    Posts
    16
    Rep Power
    0

    Default Re: Program in foreground

    Quote Originally Posted by wsaryada View Post
    You can just lock your computer and do something else :)
    Then he can just log into his user instead.

  9. #9
    JG4m3r is offline Member
    Join Date
    Mar 2012
    Posts
    16
    Rep Power
    0

    Default Re: Program in foreground

    Quote Originally Posted by Norm View Post
    Java can't do that.
    Do you know about a program that can?

  10. #10
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: Program in foreground

    That would not be a subject of discussion for New to Java. If you want to ask that on this site, start a new thread in Forum Lobby. If you do that, be sure to post a link to the new thread in this one.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  11. #11
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: Program in foreground

    Since JG4m3r didn't bother -- this discussion is now in the Forum Lobby.

    THREAD CLOSED

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Executing a sh file from java program in foreground
    By mfurtado in forum Advanced Java
    Replies: 2
    Last Post: 07-03-2009, 09:35 PM
  2. Replies: 3
    Last Post: 04-02-2009, 09:16 PM
  3. Replies: 6
    Last Post: 01-02-2009, 10:36 PM
  4. BackGround & ForeGround
    By hungleon88 in forum Advanced Java
    Replies: 3
    Last Post: 08-31-2008, 08:20 AM
  5. How to change the foreground color of a disabled control
    By arunkumarsimhadri in forum New To Java
    Replies: 0
    Last Post: 07-09-2008, 05:30 PM

Tags for this Thread

Posting Permissions

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