Net Monster
Net Monster

Reputation: 1

JDateChooser cannot be resolved to a type

I'm using eclipse photon with jdk 11, i tried the declaration of a JDateChooser but it couldn't be resolved to a type althought i imported everything in need

any idea on how i can make it work

Upvotes: 0

Views: 1529

Answers (2)

Pratik Morge
Pratik Morge

Reputation: 1

This error occurs because the JDateChooser class is not recognized by the compiler. It means that the required library or dependency for JDateChooser is missing or not properly imported.

To fix this error, you need to make sure that you have the necessary library or dependency for JDateChooser added to your project. This can be done by either downloading the JDateChooser library and adding it to your project’s classpath, or by using a build tool like Maven or Gradle to manage your dependencies.

Download the JDateChooser library and add it to your project’s classpath. Import the JDateChooser class in your code: import com.toedter.calendar.JDateChooser; Now you should be able to use the JDateChooser class in your code without any errors.

Upvotes: 0

Rakhi jha
Rakhi jha

Reputation: 21

You can use the toString() method to store the jDateChooser value into a string variable.

For example:

String dob = jDateChooser1.getDate().toString();

Upvotes: 0

Related Questions