Results 1 to 3 of 3
  1. #1
    phantomcraft is offline Member
    Join Date
    Feb 2013
    Location
    The Netherlands
    Posts
    17
    Rep Power
    0

    Question JFrame questions

    Hi i am very very new to Java so bare with me

    I'm trying to make a very simple app as my first project but it's not going to good.
    I have a button in my app and I want it to close ALL opened windows on the persons computer if thats possible (Button name = close all windows)
    Also when i am done with my app and i like the way it is. How do i make it like an actual program? (.EXE or something like that)

    Thanks!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,874
    Rep Power
    8

    Default Re: JFrame questions

    You can't close other windows from Java. At best you'll have to write native code.

    Creating an executable from Java is a separate issue, and the short answer is: are you sure you want to? There are ways to do it (and a google search will show you many options), but there are better ways to deploy Java.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

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

    Default Re: JFrame questions

    Quote Originally Posted by phantomcraft View Post
    I have a button in my app and I want it to close ALL opened windows on the persons computer if thats possible (Button name = close all windows)
    Also when i am done with my app and i like the way it is.
    If you really want to do this and aren't afraid of pissing off the users of your program, you can download and use the JNA library for this.

    How do i make it like an actual program? (.EXE or something like that)
    Look into creating a jar file. There are many tutorials that you can find on this, or if you're using an IDE, most will walk you through creating this.

Similar Threads

  1. Click in JFrame Titlebar sets the JFrame Opaque
    By tim8w in forum AWT / Swing
    Replies: 1
    Last Post: 02-02-2013, 07:29 AM
  2. Replies: 3
    Last Post: 11-27-2011, 05:18 AM
  3. Replies: 5
    Last Post: 06-14-2010, 06:10 PM
  4. Replies: 6
    Last Post: 04-12-2010, 11:33 AM
  5. Replies: 4
    Last Post: 04-22-2009, 11:02 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
  •