Results 1 to 5 of 5
  1. #1
    Seijuro is offline Member
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0

    Default Adding a project to an existing project

    Hi everyone this is my first post :)))

    Is there some way I can add a new project that I have created to an existing one I already have? And so everything runs?

    Here's what I've done:

    -I have created a Java class called mainMenu which displays a JFrame containing 5 buttons. (I created this using the nice drag n drop feature of Netbeans 6.9).
    -Then I created a Java Desktop Application from: File>New Project>Java>Java Desktop Application, which displays a editable table connected to a database. I added the mainMenu class to this project and set it to have the only main() method so my program can run from mainMenu. So far my program works great. When u run it, it displays the mainMenu then u click on the first button and it diplays the Java Desktop Application.

    Here is what I am trying to do:

    Im trying to add yet another Java Desktop Application created in the same way as the first one above to the 2nd button. The only way I know how is to make a new project. How do I add that new project to the existing one so its all one project and both applications work?

    Thanks in advance ;)

  2. #2
    Sno's Avatar
    Sno
    Sno is offline Senior Member
    Join Date
    Apr 2010
    Posts
    196
    Rep Power
    5

    Default

    I Think your way off track.

    You have 1 Project.
    Your create your java files in there.

    You can not jump project to project.

    So you create multiple java gui classes.

    use GUI.isVisible(true) or GUI.isVisible(false)

    based on that button click
    :rolleyes: ~ Sno ~ :rolleyes:
    '-~ B.S. Computer Science ~-'

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    Is the MainMenu simply a way of running several different apps, a button per app?

    If so then I would have a project which is your MainMenu one, which includes jars for each of the apps.

    It's quite possible I've completely misunderstood what you're trying to do of course...it has been known to happen.
    :)

  4. #4
    Seijuro is offline Member
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0

    Default

    Yes thats right Tolls. How do I include jars for each app? I know what a jar is but I didn't know you can use them that way.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    Well, if yu have a project for each app then Netbeans will jar that up (int he dist directory).
    If the app needs no other jars then you can just copy the app jar (eg myapp.jar) into a lib directory in the MainMenu app, and tell Netbeans about it (ie add it to the list of jars). When you build the MainMenu app then you'll see that the dist directory will now contain both your mainmenu.jar (or whatever name) as well as jars for the other apps.

Similar Threads

  1. Replies: 2
    Last Post: 08-23-2013, 10:18 AM
  2. Replies: 0
    Last Post: 03-24-2009, 03:23 PM
  3. Adding existing items to a project
    By Katherine in forum Eclipse
    Replies: 4
    Last Post: 01-20-2009, 04:23 AM
  4. open existing project project ..
    By itaipee in forum Eclipse
    Replies: 1
    Last Post: 12-28-2008, 08:12 PM

Posting Permissions

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