This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Originally posted by divya sharma: So what's a solution for this ??
If your application consists of just this one class, then the problem is, as the first response states, that you don't have a "public static void main(String[] args)" method. Without one, you don't have an application, merely a class.
To use this one class, you need a minimal main() method. It would have to create a JFrame, put your JPanel into it, set the size of the JFrame and call setVisible(true) on the JFrame to make it appear on the screen. Something like