Search code examples
javaclassimportbluej

Properly import a class in BlueJ


I've used JDatePicker for a simple app, but my teacher said that he will accept no precompiled .jar's, and he needs to see how it's able to compile from just sources.
So I checkout JDatePicker source code, extract it, and add every .java file from the extracted directory to my BueJ project. I had to remove some imports inside those extracted classes, so that JVM will "look inside project".
Now BlueJ can not find where classes JDatePickerImpl & JDatePanelImpl are defined...
And neither can I. If I grep -rn through project folder all I get is two lines of my own code.
Can anybody suggest how to import classes that are supposed to be there, just can't find definitions? Maybe, I should write an "implementation" (hence the Impl in name)?

Here's uploaded project
The only file written by me is TrainTicket.java


Solution

  • I don't see the source code of JDatePickerImpl in your project because it's missing. You need to extract it or get it from sites like grepcode.com, e.g. for JDatePickerImpl.