cannot find javax.swing.JPanel <p>I'm a novice in java coding. Just downloaded the JDK 8 and Eclipse java ee ide.</p> <p>eclipse cannot find JPanel.</p> <p>the error says the JPanel has an access restriction. </p> <p>how do I fix this?</p> <p>here is my program</p> <pre><code>import java.awt.*; import java.awt.event.*; import javax.swing.*; public class purcellm26try2 extends JPanel { public void paintComponent(Graphics g){ super.paintComponent(g); this.setBackground(Color.WHITE); g.setColor(Color.WHITE); } } </code></pre> <p>I can rephrase my question if users don't understand. Thank you</p>