Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Banking System Problem HELP!

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Location
    PH
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Banking System Problem HELP!

    Hello masters! This is my first post. I'm having problem with my Banking System program. I'm still finishing my program. The problem is in the part when you register. I used a code for a blank textfield that every time a user forgot to enter any information for the Username and Password a message box will pop up. But when you input characters in the username or password whether you leave the other textfield blank it still proceed to register. Can you help me guys??





    //=================================================================
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
     
    public class BankingSystem{
    	ImageIcon pic1,pic2;
    	JFrame log, rehistro,lagging,kame;
    	JTextField user;
    	JPasswordField pass;
    	JPanel login,register;
    	JPanel regreg, loglog;
    	JLabel lbl;
    	JButton loginbtn, regbtn;
    	JButton menubtn;
    	String bishop;
    	JComboBox year;
    	JTextField laman;
    	JLabel accnt;
    	JTextField Fname,Mname,Lname;
    	JLabel n1,n2,n3;
    	JTextField occupation;
    	JLabel job;
    	JLabel kasarian;
    	JComboBox gen;
    	JLabel bday,month;
    	JComboBox birth;
    	JTextField mobile;
    	JLabel mobilenum;
    	JLabel bg1;
    	JPanel detalye;
    	JButton aboutbtn,back2;
    	JLabel detail,detail2,detail3,detail4;
    	JLabel bg2;
    	JLabel userRegister;
    	JTextField userTxtReg;
    	JButton regButton;
    	JLabel passRegistration;
    	JPasswordField passTxtRegistration;
    	//========================================================================
    	public BankingSystem(){
    		//Paglagay ng Frame
    		log = new JFrame("Barako Bank");
     
    		//Para malagyan ng Frame
    		login = new JPanel();
    		login.setLayout( null );
    		//--------------------------------------------------------------------
    		//Username Label
    		lbl = new JLabel ("Username: ");
    		lbl.setFont(new Font("Candara", Font.BOLD, 15)); 
    		lbl.setBounds( 95, 140, 200, 20 );
    		lbl.setForeground(Color.BLACK);
    		login.add (lbl);
     
    		//Eto ung TextField for Username
    		user = new JTextField (15);
    		user.setBounds(175,140,150, 20 );
    		login.add (user);
     
    		//-------------------------------------------------------------------
    		//Password
    		lbl = new JLabel ("Password: ");
    		lbl.setFont(new Font("Candara", Font.BOLD, 15)); 
    		lbl.setBounds( 95, 170, 200, 20 );
    		lbl.setForeground(Color.BLACK);
    		login.add (lbl);
     
    		//Eto ung TextField for Password
    		pass = new JPasswordField (15);
    		pass.setBounds(175,170,150, 20 );
    		login.add (pass);
     
     
    		//-------------------------------------------------------------------
    		//Login Button
    		loginbtn= new JButton ("Login");
    		loginbtn.setBackground(Color.yellow);
    		loginbtn.setFont(new Font("Candara", Font.BOLD, 13)); 
    		loginbtn.setBounds(118,200,90, 20 );
    		LOGIN lg = new LOGIN();
    		loginbtn.addActionListener(lg);
    		login.add (loginbtn);
     
    		//--------------------------------------------------------------------
    		//Register Button
    		regbtn= new JButton ("Register");
    		regbtn.setBackground(Color.yellow);
    		regbtn.setFont(new Font("Candara", Font.BOLD, 13)); 
    		regbtn.setBounds(225,200,90, 20 );
    		REGISTER re = new REGISTER();
    		regbtn.addActionListener(re);
    		login.add (regbtn);
     
    		//-------------------------------------------------------------------
    		//About Button
     
    		aboutbtn= new JButton ("About Us");
    		//aboutbtn.setBackground(Color.green);
    		aboutbtn.setFont(new Font("Candara", Font.BOLD, 10)); 
    		aboutbtn.setBounds(310,253,75, 15 );
    		ABOUT ab = new ABOUT();
    		aboutbtn.addActionListener(ab);
    		login.add (aboutbtn);
     
     
    		//-------------------------------------------------------------------
    		//FrameSize - First Page
    		log.setSize(400,300);//Size ng Frame
    		log.setLocation(450,250);//kung saan mag popUp ung Frame
    		log.setVisible(true);//Para makita ung Frame
        	log.setResizable(false);//Para hindi maresize yung Frame
    		log.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//para maclose ung Frame
    		log.setContentPane(login);//Para mailagay ang panel sa Frame //nakalagay sa loob kung anu ung gagamiting Jpanel
    		//-------------------------------------------------------------------
    		//Background
    		pic1 = new ImageIcon("bg1.jpg"); 
    		bg1 = new JLabel(); 
    		bg1.setIcon(pic1);
    		bg1.setBounds(35,-115,500,500);
    		login.add(bg1);
     
     
    		//===================================================================
     
    	}
    	public class ABOUT implements ActionListener{
    	 	public void actionPerformed (ActionEvent ae){
    	 		log.setVisible(false);
     
    	 		kame = new JFrame("About Us");
    	 		detalye = new JPanel();
    	 		detalye.setLayout(null);
     
    	 		kame.setSize(350,400);//Size ng Frame
    			kame.setLocation(500,150);//kung saan mag popUp ung Frame
    			kame.setVisible(true);//Para makita ung Frame
    	    	kame.setResizable(false);//Para hindi maresize yung Frame
    			kame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//para maclose ung Frame
    			kame.setContentPane(detalye);
     
    			//------------------------------------------------------------
    			detail = new JLabel ("Barako Bank ");
    			detail.setFont(new Font("Candara", Font.BOLD, 25)); 
    			detail.setBounds( 108, 20, 200, 40 );
    			detail.setForeground(Color.black);
    			detalye.add (detail);
     
    			detail2 = new JLabel ("Keeping your money is our business ");
    			detail2.setFont(new Font("Candara", Font.BOLD, 12)); 
    			detail2.setBounds( 83, 38, 230, 40 );
    			detail2.setForeground(Color.DARK_GRAY);
    			detalye.add (detail2);
     
    			detail3 = new JLabel ("Version 1.0.0 ");
    			detail3.setFont(new Font("Candara", Font.BOLD, 14)); 
    			detail3.setBounds( 140, 55, 230, 40 );
    			detail3.setForeground(Color.black);
    			detalye.add (detail3);
     
     
    			detail4 = new JLabel ("Created by: Barako Brothers");
    			detail4.setFont(new Font("Candara", Font.BOLD, 15)); 
    			detail4.setBounds( 84, 80, 230, 40 );
    			detail4.setForeground(Color.black);
    			detalye.add (detail4);
     
     
    			//-----------------------------------------------------------
    			//Back Button
    			back2 = new JButton("Back");
    			//back2.setBackground(Color.green);
    			back2.setFont(new Font("Candara", Font.BOLD, 13)); 
    			back2.setBounds(248,345,80, 20 );
    			MENU2 me2 = new MENU2();
    			back2.addActionListener(me2);
    			detalye.add (back2);
     
    			//-----------------------------------------------------------
     
    			pic2 = new ImageIcon("bg3.jpg"); 
    			bg2 = new JLabel(); 
    			bg2.setIcon(pic2);
    			bg2.setBounds(0,55,350,350);
    			detalye.add(bg2);
     
     
    	 	}
    	}
     
     
    	//=====================================================================
     
    	public class REGISTER implements ActionListener{
    	 	public void actionPerformed (ActionEvent ae){
     
    	 		log.setVisible(false);//nakalagay to para mawala ung ung unang Frame
     
    	 		rehistro = new JFrame("REGISTRATION");
     
    	 		regreg = new JPanel();
    			regreg.setLayout( null );
     
    			rehistro.setSize(325,518);//Size ng Frame
    			rehistro.setLocation(460,100);//kung saan mag popUp ung Frame
    			rehistro.setVisible(true);//Para makita ung Frame
    	    	rehistro.setResizable(false);//Para hindi maresize yung Frame
    			rehistro.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//para maclose ung Frame
    			rehistro.setContentPane(regreg);//Para mailagay ang panel sa Frame //nakalagay sa loob kung anu ung gagamiting Jpanel
     
     
    			//----------------------------------------------------------------
    			//Menu button
    			menubtn= new JButton ("Back");
    			menubtn.setBackground(Color.yellow);
    			menubtn.setFont(new Font("Candara", Font.BOLD, 15)); 
    			menubtn.setBounds(200,465,100, 20 );
    			MENU me = new MENU();
    			menubtn.addActionListener(me);
    			regreg.add (menubtn);
     
    			//=======================================================================
    			//Register Details
     
     
    			//First Name
    			n1 = new JLabel ("First Name");
    			n1.setFont(new Font("Candara", Font.BOLD, 15)); 
    			n1.setBounds( 10, 15, 200, 20 );
    			n1.setForeground(Color.BLACK);
    			regreg.add (n1);
     
    			//Eto ung TextField for Username
    			Fname = new JTextField (15);
    			Fname.setBounds(120,15,180, 20 );
    			regreg.add (Fname);
     
    			//----------------------------------------------------------------------
    			//Middle Name
    			n2 = new JLabel ("Middle Name");
    			n2.setFont(new Font("Candara", Font.BOLD, 15)); 
    			n2.setBounds( 10, 45, 200, 20 );
    			n2.setForeground(Color.BLACK);
    			regreg.add (n2);
     
    			//Eto ung TextField for Username
    			Mname = new JTextField (15);
    			Mname.setBounds(120,45,180, 20 );
    			regreg.add (Mname);
     
    			//---------------------------------------------------------------------
    			//Last Name
     
    			n3 = new JLabel ("Last Name");
    			n3.setFont(new Font("Candara", Font.BOLD, 15)); 
    			n3.setBounds( 10, 75, 200, 20 );
    			n3.setForeground(Color.BLACK);
    			regreg.add (n3);
     
    			//Eto ung TextField for Username
    			Lname = new JTextField (15);
    			Lname.setBounds(120,75,180, 20 );
    			regreg.add (Lname);
     
     
    			//=======================================================================
    			//Occupation
     
     
    			job = new JLabel ("Occupation");
    			job.setFont(new Font("Candara", Font.BOLD, 15)); 
    			job.setBounds( 10, 105, 200, 20 );
    			job.setForeground(Color.BLACK);
    			regreg.add (job);
     
    			//Eto ung TextField for Username
    			occupation = new JTextField (15);
    			occupation.setBounds(120,105,180, 20 );
    			regreg.add (occupation);
     
    			//-----------------------------------------------------------------------
     
     
    			mobilenum = new JLabel ("Phone Number");
    			mobilenum.setFont(new Font("Candara", Font.BOLD, 15)); 
    			mobilenum.setBounds( 10, 135, 200, 20 );
    			mobilenum.setForeground(Color.BLACK);
    			regreg.add (mobilenum);
     
    			//Eto ung TextField for Username
    			mobile = new JTextField (15);
    			mobile.setBounds(120,135,180, 20 );
    			regreg.add (mobile);
     
    			//----------------------------------------------------------------A------
    			JTextField edad;
    			JLabel age;
     
    			age = new JLabel ("Age");
    			age.setFont(new Font("Candara", Font.BOLD, 15)); 
    			age.setBounds( 10, 165, 200, 20 );
    			age.setForeground(Color.BLACK);
    			regreg.add (age);
     
    			//Eto ung TextField for Username
    			edad = new JTextField (15);
    			edad.setBounds(45,165,30, 20 );
    			regreg.add (edad);
     
    			//---------------------------------------------------------------------
     
    			gen= new JComboBox();
    			gen.addItem("N/A");
    			gen.addItem("Male");
    			gen.addItem("Female");
    			gen.setBounds(150,165,150,20);
    			regreg.add(gen);
     
    			kasarian = new JLabel ("Gender");
    			kasarian.setFont(new Font("Candara", Font.BOLD, 15)); 
    			kasarian.setBounds( 95, 165, 200, 20 );
    			kasarian.setForeground(Color.BLACK);
    			regreg.add (kasarian);
     
    			//--------------------------------------------------------------------
    			//Month
    			birth= new JComboBox();
    			birth.addItem("N/A");
    			birth.addItem("January");
    			birth.addItem("Febuary");
    			birth.addItem("March");
    			birth.addItem("April");
    			birth.addItem("May");
    			birth.addItem("June");
    			birth.addItem("July");
    			birth.addItem("August");
    			birth.addItem("September");
    			birth.addItem("October");
    			birth.addItem("November");
    			birth.addItem("December");
    			birth.setBounds(65,225,150,20);
    			regreg.add(birth);
     
    			bday = new JLabel ("Month");
    			bday.setFont(new Font("Candara", Font.BOLD, 15)); 
    			bday.setBounds( 10, 225, 200, 20 );
    			bday.setForeground(Color.BLACK);
    			regreg.add (bday);
     
    			month = new JLabel ("--------------Birthday--------------");
    			month.setFont(new Font("Candara", Font.BOLD, 15)); 
    			month.setBounds( 80, 195, 200, 20 );
    			month.setForeground(Color.BLACK);
    			regreg.add (month);
     
    			///++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    			//Day
    			JLabel araw;
    			JComboBox day= new JComboBox();
    			day.addItem("N/A");
    			day.addItem("1");
    			day.addItem("2");
    			day.addItem("3");
    			day.addItem("4");
    			day.addItem("5");
    			day.addItem("6");
    			day.addItem("7");
    			day.addItem("8");
    			day.addItem("9");
    			day.addItem("10");
    			day.addItem("11");
    			day.addItem("12");
    			day.addItem("13");
    			day.addItem("14");
    			day.addItem("15");
    			day.addItem("16");
    			day.addItem("17");
    			day.addItem("18");
    			day.addItem("19");
    			day.addItem("20");
    			day.addItem("21");
    			day.addItem("22");
    			day.addItem("23");
    			day.addItem("24");
    			day.addItem("25");
    			day.addItem("26");
    			day.addItem("27");
    			day.addItem("28");
    			day.addItem("29");
    			day.addItem("30");
    			day.addItem("31");
    			day.setBounds(65,250,150,20);
    			regreg.add(day);
     
    			araw = new JLabel ("Day");
    			araw.setFont(new Font("Candara", Font.BOLD, 15)); 
    			araw.setBounds( 10, 250, 200, 20 );
    			araw.setForeground(Color.BLACK);
    			regreg.add (araw);
     
     
    			//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    			JLabel taon;
    			year= new JComboBox();
    			year.addItem("N/A");
    			year.addItem("2014");
    			year.addItem("2013");
    			year.addItem("2012");
    			year.addItem("2011");
    			year.addItem("2010");
    			year.addItem("2009");
    			year.addItem("2008");
    			year.addItem("2007");
    			year.addItem("2006");
    			year.addItem("2005");
    			year.addItem("2004");
    			year.addItem("2003");
    			year.addItem("2002");
    			year.addItem("2001");
    			year.addItem("1999");
    			year.addItem("1998");
    			year.addItem("1997");
    			year.addItem("1996");
    			year.addItem("1995");
    			year.addItem("1994");
    			year.addItem("1993");
    			year.addItem("1992");
    			year.addItem("1991");
    			year.addItem("1990");
    			year.addItem("1989");
    			year.addItem("1988");
    			year.addItem("1987");
    			year.addItem("1986");
    			year.addItem("1985");
    			year.addItem("1984");
    			year.addItem("1983");
    			year.addItem("1982");
    			year.addItem("1981");
    			year.addItem("1980");
    			year.addItem("1979");
    			year.addItem("1978");
    			year.addItem("1977");
    			year.addItem("1976");
    			year.addItem("1975");
    			year.addItem("1974");
    			year.addItem("1973");
    			year.addItem("1972");
    			year.addItem("1971");
    			year.addItem("1970");
    			year.addItem("1969");
    			year.addItem("1968");
    			year.addItem("1967");
    			year.addItem("1966");
    			year.addItem("1965");
    			year.addItem("1964");
    			year.addItem("1963");
    			year.addItem("1962");
    			year.addItem("1961");
    			year.addItem("1960");
    			year.addItem("1959");
    			year.addItem("1958");
    			year.addItem("1957");
    			year.addItem("1956");
    			year.addItem("1955");
    			year.addItem("1954");
    			year.addItem("1953");
    			year.addItem("1952");
    			year.addItem("1951");
    			year.addItem("1950");
    			year.addItem("1949");
    			year.addItem("1948");
    			year.addItem("1947");
    			year.addItem("1946");
    			year.addItem("1945");
    			year.addItem("1944");
    			year.addItem("1943");
    			year.addItem("1942");
    			year.addItem("1941");
    			year.addItem("1940");
    			year.addItem("1939");
    			year.addItem("1938");
    			year.addItem("1937");
    			year.addItem("1936");
    			year.addItem("1935");
    			year.addItem("1934");
    			year.addItem("1933");
    			year.addItem("1932");
    			year.addItem("1931");
    			year.addItem("1930");
    			year.setBounds(65,275,150,20);
    			TAON tt = new TAON();
    			year.addActionListener(tt);
    			regreg.add(year);
     
    			taon = new JLabel ("Year");
    			taon.setFont(new Font("Candara", Font.BOLD, 15)); 
    			taon.setBounds( 10, 275, 200, 20 );
    			taon.setForeground(Color.BLACK);
    			regreg.add (taon);
    			//------------------------------------------------------------------------
    			JTextField add1;
    			JLabel add2;
     
    			add2 = new JLabel ("Address");
    			add2.setFont(new Font("Candara", Font.BOLD, 15)); 
    			add2.setBounds( 10, 310, 200, 20 );
    			add2.setForeground(Color.BLACK);
    			regreg.add (add2);
     
     
    			add1 = new JTextField ();
    			add1.setBounds(80,310,220, 20 );
    			regreg.add (add1);
     
     
    			//------------------------------------------------------------------------
    			JTextField limit;
    			JLabel creditdetails;
     
     
    			creditdetails = new JLabel ("----Account Information----");
    			creditdetails.setFont(new Font("Candara", Font.BOLD, 15)); 
    			creditdetails.setBounds( 82, 335, 200, 20 );
    			creditdetails.setForeground(Color.BLACK);
    			regreg.add (creditdetails);
     
    			//------------------------------------------------------------------------
    			//Account Number
    			accnt = new JLabel ("AccountNum");
    			accnt.setFont(new Font("Candara", Font.BOLD, 15)); 
    			accnt.setBounds( 10, 360, 200, 20 );
    			accnt.setForeground(Color.BLACK);
    			regreg.add (accnt);
     
    			laman = new JTextField (bishop);
    			laman.setBounds(105,360,195, 20 );
    			regreg.add (laman);
     
     
    			//------------------------------------------------------------------------
    			//Username Registration
     
    			userRegister = new JLabel ("Username");
    			userRegister.setFont(new Font("Candara", Font.BOLD, 15)); 
    			userRegister.setBounds( 10, 390, 200, 20 );
    			userRegister.setForeground(Color.BLACK);
    			regreg.add (userRegister);
     
    			userTxtReg = new JTextField ();
    			userTxtReg.setBounds(105,390,195, 20 );
    			regreg.add (userTxtReg);
     
    			//-----------------------------------------------------------------------
    			//Password
     
    			passRegistration = new JLabel ("Password");
    			passRegistration.setFont(new Font("Candara", Font.BOLD, 15)); 
    			passRegistration.setBounds( 10, 420, 200, 20 );
    			passRegistration.setForeground(Color.BLACK);
    			regreg.add (passRegistration);
     
    			passTxtRegistration = new JPasswordField ();
    			passTxtRegistration.setBounds(105,420,195, 20 );
    			regreg.add (passTxtRegistration);
     
    			//------------------------------------------------------------------
     
     
     
    			regButton = new JButton("Register");
    			regButton.setBackground(Color.green);
    			regButton.setFont(new Font("Candara", Font.BOLD, 15)); 
    			regButton.setBounds(10,465,100, 20 );
    			REGISTERACT rc = new REGISTERACT();
    			regButton.addActionListener(rc);
    			regreg.add (regButton);
     
    	 	}
    	}
     
    	//=====================================================================================================
    	//Register Button
    	public class REGISTERACT implements ActionListener{
    	 		public void actionPerformed (ActionEvent ae){
     
    	 			if(passTxtRegistration.getText().trim().length() == 0 &&userTxtReg.getText().trim().length() == 0)
    	 			{
    	 				JOptionPane.showMessageDialog(null, "Please fill out the informations!", "Message", JOptionPane.ERROR_MESSAGE);
    	 			}
     
    	 			else{
     
    	 			JOptionPane.showMessageDialog(null,"Successfully Registered!");
    	 			rehistro.setVisible(false);
    	 			log.setVisible(true);
    	 			}
     
     
     
    	 		}
    	}
     
    	//=====================================================================================================
    	public class TAON implements ActionListener{
    	 		public void actionPerformed (ActionEvent ae){
     
    	 		bishop = (String)year.getSelectedItem();
    	 		laman.setText("000-00-00-"+bishop+"-");
     
    	 	}
    	}
    	//======================================================================================================
    		public class LOGIN implements ActionListener{
    	 		public void actionPerformed (ActionEvent ae){
     
     
    	 			String aa = user.getText();
    				String bb = pass.getText();
     
    				//-------------------------------------------------------------------------------------------
    				//Administrator
    				if(user.getText().equalsIgnoreCase("admin") && pass.getText().equalsIgnoreCase("admin"))
    				{
    				JOptionPane.showMessageDialog(null,"Welcome Administrator!");	
    				log.setVisible(false);	
     
    				lagging = new JFrame("Login");
    				loglog = new JPanel();
     
    	 			loglog.setLayout( null );	
     
     
    				lagging.setSize(350,500);//Size ng Frame
    				lagging.setLocation(400,170);//kung saan mag popUp ung Frame
    				lagging.setVisible(true);//Para makita ung Frame
    		    	lagging.setResizable(false);//Para hindi maresize yung Frame
    				lagging.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//para maclose ung Frame
    				lagging.setContentPane(loglog);//Para mailagay ang panel sa Frame //nakalagay sa loob kung anu ung gagamiting Jpanel
     
    				//=============================================================================================
    				//Login//administrator
     
    				//=============================================================================================
     
     
     
     
    				}
    				//----------------------------------------------------------------------------------------
     
     
    				//=============================================================================================
     
     
     
    				else{
    					JOptionPane.showMessageDialog(null,"Invalid Username or Password");
    				}
     
    	 		}
    		}
     
    			//========================================================================================
     
     
    			//------------------------------------------------------------------
    			//Menu Button=======================================================
    	public class MENU implements ActionListener{
    	 	public void actionPerformed (ActionEvent ae){
     
    	 		rehistro.setVisible(false);
    	 		log.setVisible(true);
     
     
    	 	}
    	}
     
    	//==========================================================================
    	public class MENU2 implements ActionListener{
    	 	public void actionPerformed (ActionEvent ae){
    	 		kame.setVisible(false);
    	 		log.setVisible(true);
    	 	}
    	}
     
    			//-----------------------------------------------------------------
     
    	public static void main(String[]args){
     
    		BankingSystem bs = new BankingSystem();
     
     
     
    	}
    }


  2. #2
    Member
    Join Date
    Mar 2012
    Location
    United States
    Posts
    118
    My Mood
    Inspired
    Thanks
    1
    Thanked 33 Times in 31 Posts

    Default Re: Banking System Problem HELP!

    Your issue is here:
                                    if(passTxtRegistration.getPassword().length == 0 && userTxtReg.getText().trim().length() == 0)
    	 			{
    	 				JOptionPane.showMessageDialog(null, "Please fill out the informations!", "Message", JOptionPane.ERROR_MESSAGE);
    	 			}
     
    	 			else{
     
    	 			JOptionPane.showMessageDialog(null,"Successfully Registered!");
    	 			rehistro.setVisible(false);
    	 			log.setVisible(true);
    	 			}
    Look at the logic of the if statement. As it stands the program is doing exactly what you have told it to do.

  3. #3
    Junior Member
    Join Date
    Mar 2014
    Location
    PH
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Banking System Problem HELP!

    Thank you very much sir. I found out the problem earlier at school but thank you for answering my questions. by the way is it possible to use randomaccessfile as data base for the username and password login?

  4. #4
    Member
    Join Date
    Mar 2012
    Location
    United States
    Posts
    118
    My Mood
    Inspired
    Thanks
    1
    Thanked 33 Times in 31 Posts

    Default Re: Banking System Problem HELP!

    Honestly, I don't have much experience with RandomAccessFile but after a quick glance I don't see why you can't use it to take care of the username and password. Only issue I can think of is that the password would still be plain text, but I suppose there are ways of fixing that problem up.

  5. #5
    Junior Member
    Join Date
    Mar 2014
    Location
    PH
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Banking System Problem HELP!

    I see, thank you very much for helping me out. Last question do you know how to use SQL?

Similar Threads

  1. Replies: 3
    Last Post: December 11th, 2013, 09:31 AM
  2. Having problem to find the User name from a system on a network.
    By call.abhi23 in forum Java Theory & Questions
    Replies: 0
    Last Post: June 22nd, 2012, 07:37 AM
  3. Banking System UML Class Diagram in to code.
    By djl1990 in forum Java Theory & Questions
    Replies: 2
    Last Post: October 13th, 2011, 11:55 AM
  4. banking system
    By preeti in forum Java Theory & Questions
    Replies: 3
    Last Post: August 11th, 2011, 01:25 PM
  5. Simple Banking System
    By ShadowKing98 in forum Java Theory & Questions
    Replies: 7
    Last Post: April 12th, 2011, 04:26 AM