InsurTech Companies: Enhancing ESG Aspects and Safety Measures

Image
Introduction: InsurTech companies are revolutionizing the insurance industry by integrating ESG (Environmental, Social, and Governance) aspects into their operations, particularly through enhancing safety measures, claim loss consulting, and managing the impact of global natural disasters. Below, we explore how these advancements are reflected in modern Policy Administration Systems (PAS). Enhancing Safety Measures: Utilization of IoT and Predictive Analytics: For real-time risk assessment and prevention. Smart Device Integration: Promotes safety through proactive risk mitigation. Claim Loss Consulting: Real-Time Data Analysis: Offers precise risk consulting. AI and Machine Learning: Predictive analytics for loss prevention. Global Natural Disasters: Advanced Climate Modeling: For more accurate risk pricing and coverage. Parametric Insurance: Fast payouts based on pre-set event criteria. Underwriters and PAS with ESG: Incorporation of ESG Data: Affects policy pricing and terms. Automa

Java Swing MySql JDBC: insert data into database

Program

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;

public class insertswing implements ActionListener
{
  JFrame fr;JPanel po;
  JLabel l1,l2,main;
  JTextField tf1,tf2;
  GridBagConstraints gbc;
  GridBagLayout go;
  JButton ok,exit;

public insertswing(){
fr=new JFrame("New User Data ");
Font f=new Font("Verdana",Font.BOLD,24);
po=new JPanel();
fr.getContentPane().add(po);
fr.setVisible(true);
fr.setSize(1024,768);
fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
po.setBackground(Color.WHITE);
go=new GridBagLayout();
gbc=new GridBagConstraints();
po.setLayout(go);
main=new JLabel("Enter User Details ");
main.setFont(f);
l1=new JLabel("Name  :");tf1=new JTextField(20);
l2=new JLabel("User Name  :");tf2=new JTextField(20);
ok=new JButton("Accept");
exit=new JButton("Exit");

gbc.anchor=GridBagConstraints.NORTH;gbc.gridx=5;gbc.gridy=0;
go.setConstraints(l1,gbc);po.add(main);

gbc.anchor=GridBagConstraints.WEST;gbc.gridx=5;
gbc.gridy=5;go.setConstraints(l1,gbc);po.add(l1);


gbc.anchor=GridBagConstraints.WEST;gbc.gridx=10;gbc.gridy=5;
go.setConstraints(tf1,gbc);po.add(tf1);

gbc.anchor=GridBagConstraints.WEST;gbc.gridx=5;gbc.gridy=10;
go.setConstraints(l2,gbc);po.add(l2);

gbc.anchor=GridBagConstraints.WEST;gbc.gridx=10;
gbc.gridy=10;go.setConstraints(tf2,gbc);po.add(tf2);

gbc.anchor=GridBagConstraints.WEST;gbc.gridx=10;gbc.gridy=90;
go.setConstraints(ok,gbc);po.add(ok);ok.addActionListener(this);

gbc.anchor=GridBagConstraints.WEST;gbc.gridx=11;gbc.gridy=90;
go.setConstraints(exit,gbc);po.add(exit);
exit.addActionListener(this);

}

@Override
public void actionPerformed(ActionEvent ev)
{
    if(ev.getSource()==ok)

    {
        try{
Connection con;JLabel last =new JLabel("Data inserted successfully");
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection
("jdbc:mysql://localhost/userDB","root","root");
 PreparedStatement ps=con.prepareStatement
("Insert into usertbl values(default,?,?)");
String id=tf1.getText();String sname=tf2.getText();
ps.setString(1,id);ps.setString(2,sname);
ps.executeUpdate();con.close();
tf1.setText("");tf2.setText("");
    JOptionPane.showMessageDialog(fr, "Data inserted successfully.");
        }
catch(Exception e){
    System.out.println("ERROR  "+e);
}
    }
if(ev.getSource() == exit){fr.dispose();

}
}


    public static void main(String a[]){
    new insertswing();
    }

}






output

 1. Adding values and data inserted successfully popup message




 2. Checking inserted value in database table


Comments

Popular posts from this blog

"How to maintain or retain tabs in same tab after button click events or postback?" using JQuery in ASP.NET C#

Login and Registration forms in C# windows application with Back end Microsoft SQL Server for data access

JSP and Servlet Form Submission without page refresh show results on the same page using Jquery AJAX