1

I Have downloaded The Swingset2 and SwingSet3 demo files (from the "Creating a GUI with Swing "tutorials") from the oracle downloads (and have unzipped/extracted them to the Workspace am using for the NetBeans compiler) but cant get them to run. All of the other demos from the Swing tutorial come as a project with a package and a class / relevant libraries etc so the run fine when opened in Netbeans.

The SwingSet demos come as files with code only so how do I correctly set up a project and the appropriate source packages / class / libraries etc for these demos.

Roland
  • 31
  • 1
  • 4

1 Answers1

2

For SwingSet2:

First create an empty Netbeans Java Project:

  1. File -> New Project
  2. Select Java in Categories list, Java Application in Project Types List
  3. Click Next Button
  4. Accept the defaults or Change the Project Name and/or Location as you wish.
  5. Click Finish Button.
  6. Unzip the file src.zip which came with the SwingSet2 Demo into the src subdirectory of the Project Directory you just created.
  7. Select the Project in Netbeans Projects Tab.
  8. Right-click for pop-up menu and choose "Properties".
  9. Select "Run" from list on the left.
  10. In the Main Class field enter "SwingSet2".
  11. Use the menu Run -> Build Project (F11) then Run -> Run Project(F6) to run.

For SwingSet3, It looks to me like there is no source included at all. Only an html file with out of date links. A google search turned up this project https://java.net/projects/swingset3. Unfortunately that project hasn't been updated for six years and has a dependency with no apparant documentation on how to resolve it so I would just ignore it. If you find a better link or you are using an archive with sources I missed, comment on this answer and I will check it out.

WillShackleford
  • 6,918
  • 2
  • 17
  • 33
  • To: WillShackleford In response to your question as to where I found the Scene Builder 2 samples zip file, I googled the question and found that someone had asked the same question before on Stack Overflow. There [was an answer](http://stackoverflow.com/questions/28808130/where-exactly-can-i-download-the-latest-version-of-scene-builder-for-java/28808294#28808294) which provided all of the links, and I followed them and have Scene Builder 2 with the samples and tutorials downloaded and working. – Roland Sep 02 '15 at 12:55