This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Non compilation of Sun Java's  program SpinnerDemo3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Non compilation of Sun Java Watch "Non compilation of Sun Java New topic
Author

Non compilation of Sun Java's program SpinnerDemo3

Simon Evans
Ranch Hand

Joined: Mar 27, 2008
Posts: 93
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>


Simon
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  44
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/


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Non compilation of Sun Java's program SpinnerDemo3
 
Similar Threads
Checking Date
Help please, using a JSpinner but I can't get the user's input into a date object
JSpinner dateeditor issues
Jspinner Date increment
spinner question