Auto Electric Bill Calculator System | GUI Complete Power Supply System in Java
Screenshots
Class No.1
import java.awt.EventQueue;
import javax.swing.JFrame;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.GridBagConstraints;
import javax.swing.JSeparator;
import javax.swing.ImageIcon;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import java.awt.Toolkit;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class Login extends JFrame {
// instance variables
private JTextField textField;
private JPasswordField passwordField;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Login frame = new Login();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
}
);
}
public Login() {
setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Ali\\Desktop\\pic for project\\LESCO-Logo22-crop.gif"));
setTitle("Login");
setBounds(100, 100, 450, 300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(null);
JLabel lblNewLabel = new JLabel("");
lblNewLabel.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\LESCO_Logo_blue.png"));
lblNewLabel.setBounds(122, 11, 190, 101);
getContentPane().add(lblNewLabel);
JLabel lbluserName = new JLabel("User Name");
lbluserName.setFont(new Font("Tahoma", Font.PLAIN, 13));
lbluserName.setBounds(39, 148, 73, 14);
getContentPane().add(lbluserName);
textField = new JTextField();
textField.setFont(new Font("Tahoma", Font.PLAIN, 14));
textField.setBounds(137, 146, 164, 17);
getContentPane().add(textField);
textField.setColumns(10);
JLabel lblPassword = new JLabel("Password");
lblPassword.setFont(new Font("Tahoma", Font.PLAIN, 13));
lblPassword.setBounds(39, 187, 73, 14);
getContentPane().add(lblPassword);
passwordField = new JPasswordField();
passwordField.setBounds(137, 185, 164, 16);
getContentPane().add(passwordField);
JButton btnlogIn = new JButton("Login");
btnlogIn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// after clicking these tasks are perform
BillCounter bCo = new BillCounter();
// next interface is visible
bCo.setVisible(true);
}
}
);
btnlogIn.setBounds(173, 212, 89, 23);
getContentPane().add(btnlogIn);
}
}
Class No.1
import java.awt.EventQueue;
import javax.swing.JFrame;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.GridBagConstraints;
import javax.swing.JSeparator;
import javax.swing.ImageIcon;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import java.awt.Toolkit;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class Login extends JFrame {
// instance variables
private JTextField textField;
private JPasswordField passwordField;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Login frame = new Login();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
}
);
}
public Login() {
setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Ali\\Desktop\\pic for project\\LESCO-Logo22-crop.gif"));
setTitle("Login");
setBounds(100, 100, 450, 300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(null);
JLabel lblNewLabel = new JLabel("");
lblNewLabel.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\LESCO_Logo_blue.png"));
lblNewLabel.setBounds(122, 11, 190, 101);
getContentPane().add(lblNewLabel);
JLabel lbluserName = new JLabel("User Name");
lbluserName.setFont(new Font("Tahoma", Font.PLAIN, 13));
lbluserName.setBounds(39, 148, 73, 14);
getContentPane().add(lbluserName);
textField = new JTextField();
textField.setFont(new Font("Tahoma", Font.PLAIN, 14));
textField.setBounds(137, 146, 164, 17);
getContentPane().add(textField);
textField.setColumns(10);
JLabel lblPassword = new JLabel("Password");
lblPassword.setFont(new Font("Tahoma", Font.PLAIN, 13));
lblPassword.setBounds(39, 187, 73, 14);
getContentPane().add(lblPassword);
passwordField = new JPasswordField();
passwordField.setBounds(137, 185, 164, 16);
getContentPane().add(passwordField);
JButton btnlogIn = new JButton("Login");
btnlogIn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// after clicking these tasks are perform
BillCounter bCo = new BillCounter();
// next interface is visible
bCo.setVisible(true);
}
}
);
btnlogIn.setBounds(173, 212, 89, 23);
getContentPane().add(btnlogIn);
}
}
Class No.2
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import org.omg.CORBA.ExceptionList;
import java.awt.Toolkit;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.GridBagConstraints;
import java.awt.GridLayout;
import java.awt.FlowLayout;
import javax.swing.ButtonGroup;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import net.miginfocom.swing.MigLayout;
import javax.swing.ImageIcon;
import java.awt.Font;
import java.awt.Frame;
import javax.swing.JTextField;
import javax.swing.JRadioButton;
import javax.swing.JButton;
import java.awt.SystemColor;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class BillCounter extends JFrame {
//instance variables
private JPanel contentPane;
// for get input
public JTextField tfMeterNo;
public JTextField tfName;
public JTextField tfunit;
// for radio button
private JRadioButton rdbtnTypeD;
private JRadioButton rdbtnTypeC;
private JRadioButton rdbtnTypeI;
// for show error message
private String lblmeterNumberErrorMsg;
private String lblNameErrorMsg;
private String lblmeterTotalUnitErrorMsg;
private String lblMeterTypeErrorMsg;
// for ensure that our programs is error free
private boolean anyError;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
BillCounter frame = new BillCounter();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public BillCounter() {
setTitle("LESCO.......Bill Counter");
setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Ali\\Desktop\\pic for project\\LESCO-Logo22-crop.gif"));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 479, 593);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
contentPane.setLayout(null);
JLabel logo = new JLabel("");
logo.setBounds(10, 11, 453, 86);
logo.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\logo.png"));
contentPane.add(logo);
// for produce error message
JLabel lblmeterNumberError = new JLabel("");
lblmeterNumberError.setForeground(Color.RED);
lblmeterNumberError.setBounds(152, 174, 202, 19);
contentPane.add(lblmeterNumberError);
JLabel lblNameError = new JLabel("");
lblNameError.setForeground(Color.RED);
lblNameError.setBounds(152, 237, 202, 19);
contentPane.add(lblNameError);
JLabel lblTotalUnitError = new JLabel("");
lblTotalUnitError.setForeground(Color.RED);
lblTotalUnitError.setBounds(152, 306, 202, 19);
contentPane.add(lblTotalUnitError);
JLabel lblMeterTypeError = new JLabel("");
lblMeterTypeError.setForeground(Color.RED);
lblMeterTypeError.setBounds(152, 388, 261, 19);
contentPane.add(lblMeterTypeError);
JLabel lblMeterNo = new JLabel("Meter No");
lblMeterNo.setBounds(25, 153, 61, 19);
lblMeterNo.setFont(new Font("Tahoma", Font.PLAIN, 15));
contentPane.add(lblMeterNo);
tfMeterNo = new JTextField();
tfMeterNo.setBounds(152, 153, 202, 23);
tfMeterNo.setBackground(SystemColor.inactiveCaptionBorder);
tfMeterNo.setFont(new Font("Tahoma", Font.PLAIN, 14));
contentPane.add(tfMeterNo);
tfMeterNo.setColumns(10);
JLabel ConsumerName = new JLabel("Owner Name");
ConsumerName.setBounds(25, 216, 86, 19);
ConsumerName.setFont(new Font("Tahoma", Font.PLAIN, 15));
contentPane.add(ConsumerName);
tfName = new JTextField();
tfName.setBounds(152, 216, 202, 23);
tfName.setBackground(SystemColor.inactiveCaptionBorder);
tfName.setFont(new Font("Tahoma", Font.PLAIN, 14));
tfName.setColumns(10);
contentPane.add(tfName);
JRadioButton rdbtnTypeD =new JRadioButton("Domestic");
rdbtnTypeD.setBounds(134, 358, 86, 23);
JRadioButton rdbtnTypeC = new JRadioButton("Commercial");
rdbtnTypeC.setBounds(231, 358, 105, 23);
JRadioButton rdbtnTypeI = new JRadioButton("Industrial");
rdbtnTypeI.setBounds(348, 358, 86, 23);
ButtonGroup group = new ButtonGroup();
group.add(rdbtnTypeD);
group.add(rdbtnTypeC);
group.add(rdbtnTypeI);
getContentPane().add(rdbtnTypeD);
getContentPane().add(rdbtnTypeC);
getContentPane().add(rdbtnTypeI);
JLabel MeterType = new JLabel("MeterType");
MeterType.setBounds(25, 358, 86, 19);
MeterType.setFont(new Font("Tahoma", Font.PLAIN, 15));
contentPane.add(MeterType);
JLabel UnitConsumed = new JLabel("Total Units");
UnitConsumed.setBounds(25, 284, 86, 19);
UnitConsumed.setFont(new Font("Tahoma", Font.PLAIN, 15));
contentPane.add(UnitConsumed);
tfunit = new JTextField();
tfunit.setBounds(152, 284, 202, 23);
tfunit.setBackground(SystemColor.inactiveCaptionBorder);
tfunit.setFont(new Font("Tahoma", Font.PLAIN, 14));
tfunit.setColumns(10);
contentPane.add(tfunit);
JButton btnGetBill = new JButton("Get Bill");
btnGetBill.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
// for getting the values from text fields
long meterNo=0;
long units=0;
String name;
// for error message
try {
// type casting for data
String strMeterNo=tfMeterNo.getText();
meterNo=Long.parseLong(strMeterNo);
anyError=false;
lblmeterNumberErrorMsg="";
lblmeterNumberError.setText(lblmeterNumberErrorMsg);
}
catch (java.lang.NumberFormatException e1)
{
lblmeterNumberErrorMsg="Something Going wrong....";
lblmeterNumberError.setText(lblmeterNumberErrorMsg);
anyError=true;
}
try {
// type casting for data
String strUnit=tfunit.getText();
units=Long.parseLong(strUnit);
anyError=false;
lblmeterTotalUnitErrorMsg="";
lblTotalUnitError.setText(lblmeterTotalUnitErrorMsg);
}
catch (java.lang.NumberFormatException e1)
{
lblmeterTotalUnitErrorMsg="Something Going wrong..";
lblTotalUnitError.setText(lblmeterTotalUnitErrorMsg);
anyError=true;
}
// for get the value form text field
name=tfName.getText();
int l=tfName.getText().length();
String test []={"1","2","3","4","5","6","7","8","9","0","!","@","#","$","%","^","&","*","(",")","-","_","=","+","?","{","}"};
for (int c =0; c<27;c++)
{
if (name.startsWith(test[c]) ||name.endsWith(test[c]) || name.contains(test[c]) ||name.equals("") )
{
lblNameErrorMsg="Invalid input...";
lblNameError.setText(lblNameErrorMsg);
anyError=true;
break;
}
else
{
lblNameErrorMsg="";
lblNameError.setText(lblNameErrorMsg);
anyError=false;
continue;
}
}
// after pressing the button
if (anyError)
{
btnGetBill.setText("Check Again");
btnGetBill.setFont(new Font("Tahoma", Font.PLAIN, 23));
btnGetBill.setForeground(Color.RED);
setTitle("Something going wrong....");
}
else
{
btnGetBill.setText("Please Wait..");
btnGetBill.setFont(new Font("Tahoma", Font.PLAIN, 23));
btnGetBill.setForeground(Color.ORANGE);
setTitle("Please Wait..");
}
// what type of connection
boolean domestic=rdbtnTypeD.isSelected();
boolean commercial=rdbtnTypeC.isSelected();
boolean industrial=rdbtnTypeI.isSelected();
if (domestic==false && commercial==false && industrial==false)
{
lblMeterTypeErrorMsg="Please select anyone....";
lblMeterTypeError.setText(lblMeterTypeErrorMsg);
anyError=true;
}
else
{
lblMeterTypeErrorMsg="";
lblMeterTypeError.setText(lblMeterTypeErrorMsg);
anyError=false;
}
Methods m=new Methods();
//give enter value to the variables
m.Methods(meterNo, name, units, domestic, commercial, industrial);
PrintBill pb= new PrintBill();
//if there is no error
if (anyError==false)
{
System.out.println("No error");
pb.lblNewLabel_3NameOfCunsumer.setText(tfName.getText());
pb.lblTotalConsumeUnits.setText(tfunit.getText());
pb.lblAmount.setText("Rs. "+m.costOfelecticity()) ;
pb.lblTypeOfMeter.setText(m.connectionType());
pb.lblMeterNoFinal.setText(tfMeterNo.getText());
}
else
System.out.println("error");
pb.setVisible(false);
}
}
);
btnGetBill.setBounds(152, 443, 188, 50);
btnGetBill.setFont(new Font("Tahoma", Font.PLAIN, 25));
contentPane.add(btnGetBill);
JLabel lblTitle = new JLabel("Electric Bill Counter");
lblTitle.setFont(new Font("Segoe UI Emoji", Font.PLAIN, 27));
lblTitle.setForeground(new Color(128, 128, 128));
lblTitle.setBounds(113, 95, 241, 34);
contentPane.add(lblTitle);
}
}
Class No.3
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.GridBagConstraints;
import java.awt.Toolkit;
import javax.swing.ImageIcon;
import java.awt.Color;
import java.awt.Font;
import javax.swing.SwingConstants;
import javax.swing.JSplitPane;
import javax.swing.JEditorPane;
import javax.swing.JTextArea;
import javax.swing.JButton;
import java.awt.SystemColor;
import javax.swing.JTextPane;
import javax.swing.JTextField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class PrintBill extends JFrame {
// instance variables
public JLabel lblNewLabel_3NameOfCunsumer ;
public JLabel lblTotalConsumeUnits;
public JLabel lblAmount ;
public JLabel lblTypeOfMeter;
public JLabel lblMeterNoFinal;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
PrintBill frame = new PrintBill();
frame.setVisible (true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public PrintBill() {
setTitle("Print Your Bill");
BillCounter bCo = new BillCounter();
setResizable(false);
setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Ali\\Desktop\\pic for project\\LESCO-Logo22-crop.gif"));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 929, 632);
getContentPane().setLayout(null);
JLabel lblNewLabel = new JLabel("");
lblNewLabel.setBounds(10, 11, 100, 101);
lblNewLabel.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\small.gif"));
getContentPane().add(lblNewLabel);
JLabel lblNewLabel_1 = new JLabel("");
lblNewLabel_1.setBounds(568, 11, 345, 89);
lblNewLabel_1.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\GS1-128.png"));
getContentPane().add(lblNewLabel_1);
JLabel lblNewLabel_2 = new JLabel(" Feeder MUMTAZ ROAD\r\n");
lblNewLabel_2.setBounds(645, 139, 205, 37);
getContentPane().add(lblNewLabel_2);
JLabel lblSubDivisionItehad = new JLabel(" Sub Division ITEHAD TOWN");
lblSubDivisionItehad.setBounds(645, 176, 205, 37);
getContentPane().add(lblSubDivisionItehad);
JLabel lblDivisionSamanabad = new JLabel(" Division SAMANABAD");
lblDivisionSamanabad.setBounds(645, 158, 225, 37);
getContentPane().add(lblDivisionSamanabad);
//JLabel lblNewLabel_3NameOfCunsumer = new JLabel("A");
lblNewLabel_3NameOfCunsumer =new JLabel();
lblNewLabel_3NameOfCunsumer.setBounds(120, 39, 387, 37);
lblNewLabel_3NameOfCunsumer.setFont(new Font("Tahoma", Font.PLAIN, 18));
getContentPane().add(lblNewLabel_3NameOfCunsumer);
JLabel lblNewLabel_3 = new JLabel("Lahore, Pakistan");
lblNewLabel_3.setBounds(120, 76, 377, 14);
lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 16));
getContentPane().add(lblNewLabel_3);
JLabel lblNewLabel_4 = new JLabel("SEPTEMBER");
lblNewLabel_4.setBounds(29, 140, 100, 30);
lblNewLabel_4.setFont(new Font("Tahoma", Font.PLAIN, 16));
getContentPane().add(lblNewLabel_4);
JLabel label = new JLabel("2015");
label.setBounds(47, 159, 48, 30);
label.setFont(new Font("Tahoma", Font.BOLD, 16));
getContentPane().add(label);
JLabel lblTotalConsumedUnits = new JLabel("Total Consumed Units");
lblTotalConsumedUnits.setBounds(169, 140, 186, 30);
lblTotalConsumedUnits.setFont(new Font("Tahoma", Font.PLAIN, 16));
getContentPane().add(lblTotalConsumedUnits);
lblTotalConsumeUnits = new JLabel("");
lblTotalConsumeUnits.setBounds(179, 159, 133, 30);
lblTotalConsumeUnits.setFont(new Font("Tahoma", Font.BOLD, 16));
getContentPane().add(lblTotalConsumeUnits);
JLabel lblTotal = new JLabel("TOTAL PAYABLE");
lblTotal.setBounds(645, 261, 225, 101);
lblTotal.setBackground(new Color(255, 228, 181));
lblTotal.setVerticalAlignment(SwingConstants.TOP);
lblTotal.setFont(new Font("Tahoma", Font.PLAIN, 16));
getContentPane().add(lblTotal);
lblAmount = new JLabel("");
lblAmount.setBounds(661, 287, 100, 30);
lblAmount.setFont(new Font("Dialog", Font.BOLD, 15));
lblAmount.setEnabled(true);
getContentPane().add(lblAmount);
JLabel lblDueDate = new JLabel("DUE DATE");
lblDueDate.setBounds(645, 384, 225, 101);
lblDueDate.setVerticalAlignment(SwingConstants.TOP);
lblDueDate.setFont(new Font("Tahoma", Font.PLAIN, 16));
lblDueDate.setBackground(new Color(255, 228, 181));
getContentPane().add(lblDueDate);
JLabel lblOct = new JLabel("12 OCT 15");
lblOct.setFont(new Font("Dialog", Font.BOLD, 15));
lblOct.setEnabled(true);
lblOct.setBounds(661, 417, 100, 30);
getContentPane().add(lblOct);
JLabel lblConnectionType = new JLabel("Connection Type");
lblConnectionType.setFont(new Font("Tahoma", Font.PLAIN, 16));
lblConnectionType.setBounds(169, 225, 186, 30);
getContentPane().add(lblConnectionType);
lblTypeOfMeter = new JLabel();
lblTypeOfMeter.setFont(new Font("Tahoma", Font.BOLD, 16));
lblTypeOfMeter.setBounds(179, 243, 133, 30);
getContentPane().add(lblTypeOfMeter);
JLabel lblMeterNo = new JLabel("Meter No");
lblMeterNo.setFont(new Font("Tahoma", Font.PLAIN, 16));
lblMeterNo.setBounds(34, 225, 76, 30);
getContentPane().add(lblMeterNo);
lblMeterNoFinal = new JLabel();
lblMeterNoFinal.setFont(new Font("Tahoma", Font.BOLD, 16));
lblMeterNoFinal.setBounds(36, 243, 133, 30);
getContentPane().add(lblMeterNoFinal);
JButton btnPrint = new JButton("Print Me");
btnPrint.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
btnPrint.setForeground(Color.ORANGE);
btnPrint.setText("Done..");
JOptionPane.showMessageDialog(null,"No Printer found.","Error", JOptionPane.ERROR_MESSAGE);
}
}
);
btnPrint.setBackground(SystemColor.textInactiveText);
btnPrint.setFont(new Font("Tahoma", Font.BOLD, 21));
btnPrint.setBounds(80, 339, 205, 75);
getContentPane().add(btnPrint);
JButton btnGoBack = new JButton("Again");
btnGoBack.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
// for next interface
bCo.setVisible(true);
}
});
btnGoBack.setBounds(80, 423, 89, 23);
getContentPane().add(btnGoBack);
JButton btnlogOut = new JButton("logout");
btnlogOut.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// for next interface
LogOut logout = new LogOut();
logout.setVisible(true);
}
});
btnlogOut.setBounds(196, 423, 89, 23);
getContentPane().add(btnlogOut);
}
}
Class No.4
public class Methods {
//instance variables
public long meterNo;
public String name;
public long units;
public boolean domestic;
public boolean commercial;
public boolean inductrial;
// method for initialize the class variable
public void Methods (long mNo, String n, long u,boolean d, boolean c, boolean i)
{
meterNo=mNo;
name=n;
units=u;
domestic=d;
commercial=c;
inductrial=i;
}
// method for calculate the bill
public String costOfelecticity()
{
if (domestic)
return ""+units*5;
else
if (commercial)
return ""+units*10;
else
if (inductrial)
return ""+units*10;
else
return "";
}
// method for determine connection type
public String connectionType()
{
if (domestic)
return "Domestic";
else
if (commercial)
return "Commercial";
else
if (inductrial)
return "Industrial";
else
return null;
}
}
Class No.5
import java.awt.EventQueue;
import javax.swing.JFrame;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.GridBagConstraints;
import javax.swing.JSeparator;
import javax.swing.ImageIcon;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import java.awt.Toolkit;
import javax.swing.event.AncestorListener;
import javax.swing.event.AncestorEvent;
public class LogOut extends JFrame {
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
LogOut frame = new LogOut();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public LogOut() {
setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Ali\\Desktop\\pic for project\\LESCO-Logo22-crop.gif"));
setTitle("Logout");
setBounds(100, 100, 450, 230);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(null);
JLabel lblNewLabel = new JLabel("");
lblNewLabel.setIcon(new ImageIcon("C:\\Users\\Ali\\Desktop\\pic for project\\LESCO_Logo_blue.png"));
lblNewLabel.setBounds(122, 11, 190, 101);
getContentPane().add(lblNewLabel);
JLabel lbllogOut = new JLabel("LogOut......Thank You for use me.");
lbllogOut.setFont(new Font("Tahoma", Font.PLAIN, 18));
lbllogOut.setBounds(84, 136, 291, 23);
getContentPane().add(lbllogOut);
System.exit(0);
}
}
ooo hoooooo thank you for that
ReplyDeletePlz can you tell me how i can make jfram for design and do conection between it and those classes thank you
ReplyDeleteThank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. Pay stub creator
ReplyDelete