Results 1 to 5 of 5
- 08-05-2010, 06:30 AM #1
Member
- Join Date
- Aug 2010
- Posts
- 2
- Rep Power
- 0
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 ;)
- 08-05-2010, 05:59 PM #2
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 ~-'
- 08-05-2010, 06:45 PM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 26
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.
:)
- 08-08-2010, 12:33 AM #4
Member
- Join Date
- Aug 2010
- Posts
- 2
- Rep Power
- 0
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.
- 08-08-2010, 11:15 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 26
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
-
Launch configuration EclipseStarter references non-existing project...
By Aruz in forum EclipseReplies: 2Last Post: 08-23-2013, 11:18 AM -
How does eclipse choose existing source when new project is created?
By batkins61 in forum EclipseReplies: 0Last Post: 03-24-2009, 04:23 PM -
Adding existing items to a project
By Katherine in forum EclipseReplies: 4Last Post: 01-20-2009, 05:23 AM -
open existing project project ..
By itaipee in forum EclipseReplies: 1Last Post: 12-28-2008, 09:12 PM
Bookmarks