Java Mysql simple project in Eclipse

This JDBC will teach you how to do the search in Eclipse using Mysql Database. First Step :  Establish the database connection in order to connect java and mysql. i attached the code below. Connection con; PreparedStatement pst; public void Connect() { try { Class.forName(“com.mysql.jdbc.Driver”); con = DriverManager.getConnection(“jdbc:mysql://localhost/bill”, “root”,””); } catch (ClassNotFoundException ex) { ex.printStackTrace(); […]

Java Mysql simple project in Eclipse Read More »

How to Find the Machine Name of Computer using Java

This tutorial will teach you How to Find the Machine Name of Computer using Java. Paste the Code inside the Find Button private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { String hostname; try { InetAddress address; address = InetAddress.getLocalHost(); hostname = address.getHostName(); JOptionPane.showMessageDialog(this, hostname); } catch (Exception ex) { } } i have attached the video link below.

How to Find the Machine Name of Computer using Java Read More »

Advanced Employee Salary System Using Java

This tutorial will teach you Advanced Employee Salary Calculation System Using Java step by step. Paste the code inside the cal button double empname,sal,etf,epf,etfamount,epfamount,gsal,allow,nsal; private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { sal = Double.parseDouble(txtsal.getText()); if(chketf.isSelected()== true) { etfamount = sal * 10/100; } if(chketf.isSelected()== true) { epfamount = sal * 5/100; } txtetf.setText(String.valueOf(etfamount)); txtepf.setText(String.valueOf(epfamount)); gsal = sal

Advanced Employee Salary System Using Java Read More »

Currency Converter Using Java

This tutorial will teach you how to make make a Currency Converter Using Java step by step. Paste the below the code inside the convert button. private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { Double tot; Double amount = Double.parseDouble(txtamount.getText()); if(txtfrom.getSelectedItem().toString() == “USD” && txtto.getSelectedItem().toString() == “Srilankan Rupees”) { tot = amount * 179.50; JOptionPane.showMessageDialog(this, “Your Amount will

Currency Converter Using Java Read More »

How to add Two numbers using Spring boot

This tutorial will teach you how to add two numbers using Spring Boot. First Step Select the Template folder.Inside the template folder create index.html page. index.html <!DOCTYPE html> <html> <head> <meta charset=”ISO-8859-1″> <title>Insert title here</title> <link href=”https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css” rel=”stylesheet” > </head> <body> <div class=”container”> <div class=”row”> <div> <h1>Add Two Numbers</h1> </div> <form th:action=”@{addtion}” th:object=”${addtion}” method=”post”> <div>

How to add Two numbers using Spring boot Read More »

Calculator Program in Java Eclipse

This tutorial will teach you how to make a simple calculator using Java Eclipse. First Step : you must extends the JFrame and implements ActionListener .I have attached the video tutorial below it will help you  to do this  step by step. import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JLabel; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JPanel; import javax.swing.JTextField; import

Calculator Program in Java Eclipse Read More »