⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 student.java

📁 student information management system.
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
						gbc1.gridx = 0;       						     
			        	gbc1.gridy = 8;       						
			        	grid.setConstraints(jgender, gbc1);
			        	pan2.add(jgender);					
			    	male = new JRadioButton("Male",true);
						male.setFont(dFont);		
						gbc1.fill = GridBagConstraints.BOTH;
						gbc1.ipady = 2;       						
		       			gbc1.ipadx = 2;  
		       			gbc1.gridx = 1;
		        		gbc1.gridy = 8;
		        		grid.setConstraints(male, gbc1);
						male.addActionListener(new RadioListener());
						bg1.add(male);
					pan2.add(male);	
	   				female = new JRadioButton("Female",false);
						female.setFont(dFont);		
						gbc1.fill = GridBagConstraints.BOTH;
						gbc1.ipady = 2;       						
		       			gbc1.ipadx = 2;  
		       			gbc1.gridx = 2;
		        		gbc1.gridy = 8;
		        		grid.setConstraints(female, gbc1);								
						female.addActionListener(new RadioListener());	
						bg1.add(female);
					pan2.add(female);
				jcourse = new JLabel(" Course ");	
						jcourse.setFont(dFont);				
						gbc1.ipady = 2;       						
						gbc1.ipadx = 2;  
						gbc1.gridx = 0;       						     
			        	gbc1.gridy = 9;       						
			        	grid.setConstraints(jcourse, gbc1);				
					pan2.add(jcourse);	
					cb_course = new JComboBox();
						// Applying Fonts inside the combo box as courier new 
						cb_course.setFont(dFont);	
						// Adding the elements to combo box
				 		cb_course.addItem("BSc(Comp.Sc.)");
						cb_course.addItem("BCA");
		    			// Filling it align properly with other Elements inside the TAB
		    			gbc1.fill = GridBagConstraints.BOTH;
						gbc1.insets = new Insets(10,0,0,30);  		
						gbc1.ipady = 2;     						
						gbc1.ipadx = 2;							
		       	        gbc1.gridx = 1;							
		        		gbc1.gridy = 9;							
						cb_course.addItemListener(new ComboBoxListener());	
		        		grid.setConstraints(cb_course, gbc1);
		        		pan2.add(cb_course);
					cb_year = new JComboBox();
						cb_year.setFont(dFont);	
						// Adding the combo box elements to combo box
				 		cb_year.addItem(" I Year ");
		    			cb_year.addItem(" II Year ");
						cb_year.addItem(" III Year ");
						gbc1.fill = GridBagConstraints.BOTH;
						gbc1.insets = new Insets(10,0,0,30);  		
		    			gbc1.ipady = 2;     
						gbc1.ipadx = 2;		
		       	        gbc1.gridx = 2;	
		        		gbc1.gridy = 9;			
						cb_year.addItemListener(new ComboBoxListener());			
		        		grid.setConstraints(cb_year, gbc1);
		        	    pan2.add(cb_year);			
					dmc = new JCheckBox("Detail Mark Sheet Given");
						//Using check boxes
						gbc1.fill = GridBagConstraints.BOTH;
						gbc1.ipady = 0;       						
						gbc1.ipadx = 0;  
						gbc1.gridx = 1;       						     
			        	gbc1.gridy = 10; 						
						grid.setConstraints(dmc, gbc1);
						dmc.setFont(dFont);
						dmc.addItemListener(new CheckBoxListener());
    				pan2.add(dmc);										
					degree = new JCheckBox("Degree Awarded");
						gbc1.ipady = 0;       						
						gbc1.ipadx = 0;  
						gbc1.gridx = 2;       						     
			        	gbc1.gridy = 10; 
						grid.setConstraints(degree, gbc1);
						degree.setFont(dFont);
						degree.addItemListener(new CheckBoxListener());
    				pan2.add(degree);							
					charcerti = new JCheckBox("Character Certificate Given ");
						gbc1.ipady = 0;       						
						gbc1.ipadx = 0;  
						gbc1.gridx = 1;       						     
			        	gbc1.gridy = 11; 
						grid.setConstraints(charcerti, gbc1);
						charcerti.setFont(dFont);
						charcerti.addItemListener(new CheckBoxListener());
    				pan2.add(charcerti);		
					ncc = new JCheckBox("NCC Certificate Given");
						gbc1.ipady = 0;       						
						gbc1.ipadx = 0;  
						gbc1.gridx = 2;       						     
			        	gbc1.gridy = 11;
						grid.setConstraints(ncc, gbc1);
						ncc.setFont(dFont);
						ncc.addItemListener(new CheckBoxListener());
    				pan2.add(ncc);	
					save = new JButton("SAVE RECORD");										
						gbc1.ipady = 1;       						
						gbc1.ipadx = 2;  
						gbc1.gridx = 2;       						     
			        	gbc1.gridy = 12;  
						grid.setConstraints(save, gbc1);	
					// Handling the SAVERECORD button on click event by ButtonHandler() class
					save.addActionListener(new ButtonHandler());
					pan2.add(save);
					tbPane.addTab(panelstr2,pan2);

		}
		//-------------------------------------------------------------- Ending with displayPanel2() method ---------
		//============================================================ Starting displayPanel3() method =========
		void displayPanel3() //MODIFY/DELETE STUDENT DETAILS TAB
		{
				   pan3 = new JPanel();
				   pan3.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),""));
				   pan3.setLayout(grid);	
				   cb_sname = new JComboBox();
				   cb_sname.addItem("Select Student Name");
					cb_sname.setFont(dFont);	
					gbc2.fill = GridBagConstraints.BOTH;		
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 2;       						     
			        	gbc2.gridy = 1;       						
			        	grid.setConstraints(cb_sname, gbc2);			
						cb_sname.addItemListener(new ComboBoxListener());		
					pan3.add(cb_sname);		
				   jmstudentname = new JLabel("Student Name");	
				   jmstudentname.setFont(dFont);		
						gbc2.fill = GridBagConstraints.BOTH;		
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 0;       						     
			        	gbc2.gridy = 2;       						
			        	grid.setConstraints(jmstudentname, gbc2);
			       	pan3.add(jmstudentname);															
					tmname = new JTextField(20);
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 1;       						     
			        	gbc2.gridy = 2;       						
			        	grid.setConstraints(tmname, gbc2);				
					pan3.add(tmname);									
					jmdob = new JLabel("Date of Birth ");
					jmdob.setFont(dFont);				
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 0;       						     
			        	gbc2.gridy = 3;       						
			        	grid.setConstraints(jmdob, gbc2);				
					pan3.add(jmdob);													
					tmdob = new JTextField(20);	
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 1;       						     
			        	gbc2.gridy = 3;       						
			        	grid.setConstraints(tmdob, gbc2);				
					pan3.add(tmdob);				
					jmfathername = new JLabel("Father's Name");	
						jmfathername.setFont(dFont);				
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 0;       						     
			        	gbc2.gridy = 4;       						
			        	grid.setConstraints(jmfathername, gbc2);				
					pan3.add(jmfathername);	
				tmfathername = new JTextField(20);
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 1;       						     
			        	gbc2.gridy = 4;       						
			        	grid.setConstraints(tmfathername, gbc2);				
					pan3.add(tmfathername);				
					jmfatheroccupation = new JLabel("Father's Occupation");	
					jmfatheroccupation.setFont(dFont);	
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 0;       						     
			        	gbc2.gridy = 5;       						
			        	grid.setConstraints(jmfatheroccupation, gbc2);
			        	pan3.add(jmfatheroccupation);					
			        	mcb_fatheroccupation = new JComboBox();
						mcb_fatheroccupation.setFont(dFont);	
						// Adding the combo box elements to combo box
				 		mcb_fatheroccupation.addItem(" Govt. Employee ");
		    			mcb_fatheroccupation.addItem(" Self Employed ");
						mcb_fatheroccupation.addItem(" Business ");
						gbc2.fill = GridBagConstraints.BOTH;
						gbc2.insets = new Insets(10,0,0,30);  		
		    			gbc2.ipady = 2;     
						gbc2.ipadx = 2;		
		       	        gbc2.gridx = 1;	
		        		gbc2.gridy = 5;			
						mcb_fatheroccupation.addItemListener(new ComboBoxListener());			
		        		grid.setConstraints(mcb_fatheroccupation, gbc2);
		        	    pan3.add(mcb_fatheroccupation);																
					jmpreaddress = new JLabel("Present Address");	
						jmpreaddress.setFont(dFont);				
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 0;       						     
			        	gbc2.gridy = 6;       						
			        	grid.setConstraints(jmpreaddress, gbc2);		
					pan3.add(jmpreaddress);

					tmpreaddress = new JTextField(20);
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 1;       						     
			        	gbc2.gridy = 6;   
						grid.setConstraints(tmpreaddress, gbc2);	
					pan3.add(tmpreaddress);						

					JLabel jmpermaaddress = new JLabel("Permanent Address ");	
						jmpermaaddress.setFont(dFont);				
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 0;       						     
			        	gbc2.gridy = 7;       						
			        	grid.setConstraints(jmpermaaddress, gbc2);		
					pan3.add(jmpermaaddress);	
 					tmpermaaddress = new JTextField(20);
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 1;       						     
			        	gbc2.gridy = 7;   
						grid.setConstraints(tmpermaaddress, gbc2);	
					pan3.add(tmpermaaddress);	
					jmphone = new JLabel(" Telephone Number ");	
						jmphone.setFont(dFont);				
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 0;       						     
			        	gbc2.gridy = 8;       						
			        	grid.setConstraints(jmphone, gbc2);		
					pan3.add(jmphone);
					tmphone = new JTextField(20);
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 1;       						     
			        	gbc2.gridy = 8;   
						grid.setConstraints(tmphone, gbc2);	
					pan3.add(tmphone);						
					// Checking the default gender as male by using true
					jmgender = new JLabel("Gender");	
					jmgender.setFont(dFont);	
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 0;       						     
			        	gbc2.gridy = 9;       						
			        	grid.setConstraints(jmgender, gbc2);
			        	pan3.add(jmgender);					
					
					m_male = new JRadioButton("Male",true);
						m_male.setFont(dFont);		
						gbc2.fill = GridBagConstraints.BOTH;
						gbc2.ipady = 2;       						
		       			gbc2.ipadx = 2;  
		       			gbc2.gridx = 1;
		        		gbc2.gridy = 9;
		        		grid.setConstraints(m_male, gbc2);
						m_male.addActionListener(alistener);
						bg2.add(m_male);
					pan3.add(m_male);	
	   				m_female = new JRadioButton("Female",false);
						m_female.setFont(dFont);		
						gbc2.fill = GridBagConstraints.BOTH;
						gbc2.ipady = 2;       						
		       			gbc2.ipadx = 2;  
		       			gbc2.gridx = 2;
		        		gbc2.gridy = 9;
		        		grid.setConstraints(m_female, gbc2);								
						m_female.addActionListener(alistener);	
						bg2.add(m_female);
					pan3.add(m_female);
					jmcourse = new JLabel(" Course ");	
						jmcourse.setFont(dFont);				
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 0;       						     
			        	gbc2.gridy = 10;       						
			        	grid.setConstraints(jmcourse, gbc2);				
					pan3.add(jmcourse);	
					mcb_course = new JComboBox();
					mcb_course.setFont(dFont);	
						// Adding the combo box elements to combo box
				 		mcb_course.addItem("BSc(Comp.Sc.)");
						mcb_course.addItem("BCA");
		    			// Fillig it to align properly with other Elements inside the TAB
		    			gbc2.fill = GridBagConstraints.BOTH;
						gbc2.insets = new Insets(10,0,0,30);  		
						gbc2.ipady = 2;     						
						gbc2.ipadx = 2;							
		       	        gbc2.gridx = 1;							
		        		gbc2.gridy = 10;							
						mcb_course.addItemListener(new ComboBoxListener());	
		        		grid.setConstraints(mcb_course, gbc2);
		        		pan3.add(mcb_course);
						mcb_year = new JComboBox();
						mcb_year.setFont(dFont);	
						// Adding Elements to combo box
				 		mcb_year.addItem(" I Year ");
		    			mcb_year.addItem(" II Year ");
						mcb_year.addItem(" III Year ");
						gbc2.fill = GridBagConstraints.BOTH;
						gbc2.insets = new Insets(10,0,0,30);  		
		    			gbc2.ipady = 2;     
						gbc2.ipadx = 2;		
		       	        gbc2.gridx = 2;	
		        		gbc2.gridy = 10;			
						mcb_year.addItemListener(new ComboBoxListener());			
		        		grid.setConstraints(mcb_year, gbc2);
		        	    pan3.add(mcb_year);			
					mdmc = new JCheckBox("Detail Mark Sheet Given");
					gbc2.fill = GridBagConstraints.BOTH;
						gbc2.ipady = 0;       						
						gbc2.ipadx = 0;  
						gbc2.gridx = 1;       						     
			        	gbc2.gridy = 11; 						
						grid.setConstraints(mdmc, gbc2);
						mdmc.setFont(dFont);
						mdmc.addItemListener(new CheckBoxListener());
    				pan3.add(mdmc);										
					mdegree = new JCheckBox("Degree Awarded");
						gbc2.ipady = 0;       						
						gbc2.ipadx = 0;  
						gbc2.gridx = 2;       						     
			        	gbc2.gridy = 11; 
						grid.setConstraints(mdegree, gbc2);
						mdegree.setFont(dFont);
						mdegree.addItemListener(new CheckBoxListener());
    				pan3.add(mdegree);							
					mcharcerti = new JCheckBox("Character Certificate Given ");
						gbc2.ipady = 0;       						
						gbc2.ipadx = 0;  
						gbc2.gridx = 1;       						     
			        	gbc2.gridy = 12; 
						grid.setConstraints(mcharcerti, gbc2);
						mcharcerti.setFont(dFont);
						mcharcerti.addItemListener(new CheckBoxListener());
    				pan3.add(mcharcerti);		
					mncc = new JCheckBox("NCC Certificate Given");
						gbc2.ipady = 0;       						
						gbc2.ipadx = 0;  
						gbc2.gridx = 2;       						     
			        	gbc2.gridy = 12;
						grid.setConstraints(mncc, gbc2);
						mncc.setFont(dFont);
						mncc.addItemListener(new CheckBoxListener());
    				pan3.add(mncc);	
					del = new JButton("DELETE");										
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 1;       						     
			        	gbc2.gridy = 13;  
						grid.setConstraints(del, gbc2);
						pan3.add(del);
						del.addActionListener(new ButtonHandler());											
					mod_button = new JButton("MODIFY");										
						gbc2.ipady = 2;       						
						gbc2.ipadx = 2;  
						gbc2.gridx = 2;       						     
			        	gbc2.gridy = 13;  
						grid.setConstraints(mod_button, gbc2);
						pan3.add(mod_button);
						mod_button.addActionListener(new ButtonHandler());					
						tbPane.addTab(panelstr3, pan3);	
			accessStudName();
		}
		//-------------------------------------------------------------- Ending with displayPanel3() method ---------			
		//---------------------------------------------------------------Starting with displayPanes() method---------
		void displayPanes() // ACCOUNTANT LOGGEDIN
		{	
			displayPanel2();
			displayPanel3();
		}		
		
		//========================================================== Starting with  verifyLogin() =============	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -