Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Non compilation of Sun Java's program SpinnerDemo3

 
Simon Evans
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>
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • 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/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic