This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Non compilation of Sun Java's program SpinnerDemo3

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Programmers,

Having downloaded the JDK 6.0 (see console input/output below) it returns compiler errors on a program I copied direct from the SunJava site -
being SpinnerDemo3.

I was wondering whether the code is faulty, the jdk is faulty - or perish the thought - I am faulty.

Anyhow whatever the cause, I enclose the code for SpinnerDemo3 below, also the console response.

Thank you for helping.

Yours
Simon.




Console output:-

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>cd C:\Java\Java Six

C:\Java\Java Six>set PATH=C:\Program Files\Java\jdk1.6.0_05\bin;%PATH%

C:\Java\Java Six>javac SpinnerDemo3.java
SpinnerDemo3.java:74: cannot find symbol
symbol : class CyclingSpinnerListModel
location: class components.SpinnerDemo3
monthModel = new CyclingSpinnerListModel(monthStrings);
^
SpinnerDemo3.java:96: cannot find symbol
symbol : class CyclingSpinnerListModel
location: class components.SpinnerDemo3
if (monthModel instanceof CyclingSpinnerListModel) {
^
SpinnerDemo3.java:97: cannot find symbol
symbol : class CyclingSpinnerListModel
location: class components.SpinnerDemo3
((CyclingSpinnerListModel)monthModel).setLinkedModel(yearModel);
^
SpinnerDemo3.java:130: cannot find symbol
symbol : variable SpringUtilities
location: class components.SpinnerDemo3
SpringUtilities.makeCompactGrid(this,
^
4 errors

C:\Java\Java Six>
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The example consists of more than one source file. The other files can also be downloaded from http://java.sun.com/docs/books/tutorial/uiswing/examples/components/
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic