Hi All,
I hv written a java swing class in Eclipse IDE.
i hope the code is 100% correct but when im running the class, the error message is displaying in the console. As
Exception in thread "main" java.lang.NoClassDefFoundError: com/cname/lct/madm/gui/madmplugin/rani/ConfirmExitDialog
Below is my code
package com.cname.lct.madm.gui.madmplugin.rani;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ConfirmExitDialog extends JFrame {
public ConfirmExitDialog() {
super("Confirm Exit Dialog Example");
this.setSize(350, 150);
Container contentPane = this.getContentPane();
contentPane.setLayout(new BorderLayout());
JLabel label1 = new JLabel("Confirm Exit Dialog Example", JLabel.LEFT);
contentPane.add(label1, BorderLayout.SOUTH);
}
protected void processWindowEvent(WindowEvent e) {
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
int exit = JOptionPane.showConfirmDialog(this, "Are you sure to exit?");
if (exit == JOptionPane.YES_NO_OPTION)
{
System.exit(0);
}
} else {
super.processWindowEvent(e);
}
}
public static void main(String[] args) {
ConfirmExitDialog mainFrame = new ConfirmExitDialog();
mainFrame.setVisible(true);
//mainFrame.show();
}
}
I dont know how to resolve this error
Please help me to solve the error.:(
Regards,
Ranithomas.