• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Copying a multifile program

 
John Burville
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am learning Java, and a program on the web has a lot of stuff I want to use. The program has several files which are .java files. I am using Netbeans IDE 7.0, and cannot figure out how to bring the group of files into the program. The site where I am getting the sample program from is: http://www.neiljohan.com/java/ and the program is patience with the following files:

Patience
CardTest.java
Pack.java
PackImpl.java
Patience.java
PlayingCard.java
PlayingCardImpl.java
NeilClass.java
Patience Game, Uses a generic Playing Card and Pack object to create a simple card game. The ADT is designed to be as generic as possible so any card game could be created using it. Uses List Array Structure, shows how to create a simple to use generic ADT.

Can you help, as I feel this will help me leap forward with Java. NB I have done the sample programs which are all a single class.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15495
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

You can just create a new project using NetBeans (choose File / New Project, and then Java / Java Application), and copy all the source files for the program in the source folder of the project.
 
Manoj Kumar M
Greenhorn
Posts: 5
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

better you mark the folder having the java files as source folder for your project in your IDE.
 
John Burville
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, something worked, though I had expected it to be more graphical rather than a small amount of script. I did have to choose which program had the main "main" in it. My next challenge which I will work on is to make the program display a playing card and then a surface for the playing card.

My programming days was well before OOP. So I am slowly understanding it.

John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic