Java

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 »

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 »

JavaFx Mysql Search

This JDBC will teach you how to do the search in Netbeans using Mysql Database. First Step  Install Scence Builder in your computer follow this link    to download the scene builder which will offers all visual layout components which will easy to drag and drop and make the attractive look. After installed the Scence Builder in

JavaFx Mysql Search Read More »