Skip to main content

Posts

Featured Post

Java Program to Display record using JFrame and Prepaired Statement

Java Program to Display  record using JFrame and Prepaired Statement Java Program to Display  record using JFrame and 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 FrameDisplay extends JFrame implements ActionListener{       JTextField tf1,tf2,tf3;       JButton b1,b2;      JLabel l1,l2;    String snm; Connection con;  Statement smt;   ResultSet rs; //declaration of control    FrameDisplay(){           JFrame f= new JFrame("Display Demo");   // l1=new JLabel("Enter RollNo"); l1.setBounds(150,10,150,50);         tf1=new JTextField();           tf1.setBounds(1...
Recent posts

Java Program to update record using JFrame and Prepaired Statement

Java Program to update record using JFrame and Prepaired Statement Java Program to edit 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 FrameUpdate extends JFrame implements ActionListener{       JTextField tf1,tf2,tf3;       JButton b1,b2;   JLabel l1,l2; Connection con;    PreparedStatement psmt;   int result; //declaration of control   FrameUpdate(){           JFrame f= new JFrame("UpdateDemo");   // l1=new JLabel("Enter RollNo"); l1.setBounds(150,10,150,50);         tf1=new JTextField();           tf1.setBounds(150,50,150,20);   ...

Java Program to delete record using JFrame and Prepaired Statement

Java Program to delete 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 FrameDelete extends JFrame implements ActionListener{       JTextField tf1,tf2,tf3;       JButton b1,b2;   JLabel l1,l2; Connection con;    PreparedStatement psmt;   int result; //declaration of control    FrameDelete(){           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);   tf3=new JTextField();           tf3.setBounds(1...

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...

jbutton Click Event example Advance Java

Jbutton Click Event example Advance Java  Change frame Color On Button click Advance Java  import javax.swing.*; import java.awt.*; import java.awt.event.*;      class FrameDemo extends JFrame implements ActionListener {       JButton btn; Container c;          FrameDemo() {               c=this.getContentPane();        JButton btn= new JButton("Click"); btn.setBounds(100,50,100,50);         c.add(btn);         c.setLayout(null);        btn.addActionListener(this); }                    public void actionPerformed(ActionEvent a) {                     c.setBackground(Color.RED); } }        // cre...

Advance Java Login Form

Advance Java Login Form,  java login form using jframe   import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.Color; public class Login extends JFrame { public Login() {     setTitle("Login Form"); getContentPane().setBackground(Color.pink);      setSize(300,200);      setLayout(null);      setDefaultCloseOperation(EXIT_ON_CLOSE);    setLocation(400, 200);           JLabel l0=new JLabel("Login Form");        l0.setBounds(150,10,100,20);   add(l0);  JLabel l1=new JLabel("Enter User Name");  l1.setBounds(30,50,100,20);  add(l1);      JTextField textFieldUserName = new JTextField(50);     textFieldUserName.setBounds(140,50,80,20);       add(textFieldUserName);    JLabel l2=new JLabel("Enter Password...

Calculator Program using jFrame

Calculator Program using jFrame java swing calculator example java jframe calculator source code java code for simple calculator using gui how to make a calculator in advance java using JFrame simple calculator program in java using frame simple calculator program in java source code write a code to create simple calculator using swing component import javax.swing.*; import java.awt.event.*; public class TextFieldExample extends JFrame implements ActionListener{     JTextField tf1,tf2,tf3;     JButton b1,b2; //declaration of control     TextFieldExample(){         JFrame f= new JFrame("Button click demo"); //         tf1=new JTextField();         tf1.setBounds(50,50,150,20);         tf2=new JTextField();         tf2.setBounds(50,100,150,20);         tf3=new JTextField();       ...

Labels

Show more