Skip to main content

Posts

Showing posts with the label Java Program to insert record using JFrame and Prepaired Statement

java insert using JFrame and Prepaired Statement

Java Program to insert record using JFrame and Prepaired Statement Here is table Design  Create table demo using two column as id  and Dname , id is primary key  Program source code  import javax.swing.*;   import java.awt.event.*;   import java.sql.*; public class FrameInsert extends JFrame implements ActionListener{       JTextField tf1,tf2,tf3;       JButton b1,b2;   JLabel l1,l2; Connection con;    PreparedStatement psmt;   int result; //declaration of control    FrameInsert(){           JFrame f= new JFrame("InsertDemo");   // l1=new JLabel("Enter RollNo"); l1.setBounds(150,10,150,50);         tf1=new JTextField();           tf1.setBounds(150,50,150,20);   l2=new JLabel("Enter Name"); l2.setBounds(150,60,150,5...

Labels

Show more