Hello EveryOne
I need Help here ,i have been trying to view this GUI but it keeps showing me this erroe NoClassDefFounderError
.
Anyones help would be appreciated.
import java.awt.*;
import java.awt.event.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.*;
public class HeartLandHomeFinance2 extends JFrame
{
JPanel Panel;
JLabel lb1, lb2, lb3 ,lb4 ,lb5 ,lb6,lb7,lb8,lb9,lb10,lb11,lb12,lb13,lb14,
lb15,lb16,lb17,lb18,lb19,lb20,lb21,lb22,lb23, heading,lb24;
JTextField jt1,jt2,jt3,jt4,jt5,jt6,jt7,jt8,jt9,jt10,jt11,jt12,jt13,jt14,jt15,jt16,jt18,jt17;
JButton bt1,bt2;
GridBagLayout gb;
JScrollPane jscrollpane;
GridBagConstraints gbc;
JComboBox combo1,combo2,combo3,combo4,combo5,combo6;
Connection con;
PreparedStatement stat;
Statement stmt;
ResultSet rs;
Font f;
public void HeartLandHomeFinance2()
{
JFrame frame = new JFrame("Heart Land Home Finance");
JFrame.setDefaultLookAndFeelDecorated(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setSize(600, 300);
frame.setVisible(true);
createAndShowGUI();
}
public void createAndShowGUI()
{
Panel =new JPanel();
Panel.setLayout(gb);
Panel.setBackground(Color.RED);
Container contentPane = getContentPane();
gb = new GridBagLayout();
gbc = new GridBagConstraints();
f = new Font("Monospaced", Font.BOLD, 24);
gbc.gridx = 1;
gbc.gridy = 0;
gbc.gridwidth = 3;
heading = new JLabel("Heart Land Home Finance");
heading.setForeground(Color.black);
heading.setFont(f);
Panel.add( heading, gbc);
gbc.gridx = 0;
gbc.gridy = 1;
gbc.gridwidth = 5;
lb1 =new JLabel("Please Fill All The Fields in CAPITAL LETTERS");
lb1.setFont(f);
lb1.setForeground(Color.black);
gbc.ipady = 2;
gbc.ipadx = 2;
gbc.gridx = 2;
gbc.gridy = 3;
gb.setConstraints(lb1, gbc);
Panel.add(lb1);
lb2 =new JLabel("Name:");
gbc.ipady = 2;
gbc.ipadx = 2;
gbc.gridx = 2;
gbc.gridy = 3;
gb.setConstraints(lb2, gbc);
Panel.add(lb2);
jt1 = new JTextField(30);
gbc.ipady = 2;
gbc.ipadx = 2;
gbc.gridx = 1;
gbc.gridy = 7;
gb.setConstraints(jt1, gbc);
Panel.add(jt1);
}
public static void main(String args[])
{
HeartLandHomeFinance2 h = new HeartLandHomeFinance2();
h.Show();
}
}
grts
tactfulsaint.