I was trying to implement the concept of  swing using eclipse in jdk 1.8 but when I used the identifier like JButton then an error came :   
The type JButton is not accessible due to restriction on required library C:\ProgramFiles
\Java\jre 1.8.0_31\lib\rt.jar
I am a newbie Java programmer.Can someone please help me out with this error?
 
     
    