php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS506 Web Design and Development assignment No 02 SEMESTER idea solution Spring 2011
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
Question:
Write a program in notepad as an editor for coding such that you are required to build up a Graphical User Interface code for making window similar to following:

[Image: cs506%2B25-4-2011.JPG]
And when ok button is pressed in above window then following dialog box should appear based on selected date and time
[Image: cs506%2B2.JPG]
Important: You should not use available GUI based tools of calendar or time for this assignment this should be your own hard work and creativity test. Else you will get zero marks for sure.

Note: All the source code should be written manually. Your code must justify enough for 15 marks.


Attached Files
.doc   Spring 2011_CS506_2.doc (Size: 179 KB / Downloads: 339)

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply
#2
Get the solution code. below
CS506 ASSIGNMENT 2 IDEA
SOLUTION
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
public class GUI implements ActionListener
{
ArrayList personsList;
PersonDAO pDAO;
JFrame myFrame;
// labels
JLabel lNIC Card, lFather/Husband'sName, lAge, lAddress, lProvance;
// text fields
JTextField tfNIC Card, tfFather/Husband'sName, tfAge, tfAddress, tfProvance;
// buttons
JButton bSave, bExit;
String Father/Husband'sname, address, Provance;
int NIC Card, Age;
//***********************************************************************************
**
/*GUI Constructor*/
public GUI()
{
NIc Card = "";
FAther/HUsband's Name = "";
Age = "";
Address = "";
provance = "";
recordNumber = -1;
initGUI();
personsList = new ArrayList();
// creating PersonDAO object
pDAO = new PersonDAO();
}
//***********************************************************************************
******
/*initGui function will initialize our GUI*/
public void initGUI()
{
/*Create a frame, get its contentpane and set layout*/
myFrame = new JFrame("Voter Registration Form");
Container c = myFrame.getContentPane();
c.setLayout(new FlowLayout());
/*initializing labels*/
lNIC Card = new JLabel("NIC Card");
lFather/HUsband's Name = new JLabel("Father/HUsband's Name");
lAge = new JLabel("Age");
lAddress = new JLabel("Address");
lProvance = new JLabel("provance");
/*initializing text fields*/
tfNIC Card = new JTextField(20);
tfFather'Husband's Name = new JTextField(20);
tfAge = new JTextField(20);
tfAddress = new JTextField(20);
tfProvance = new JTextField(20);
/* intializing buttons */
bSave = new JButton("Save");
bExit = new JButton("Exit");
/*add all initialized components to the container*/
c.add(lNIC Card);
c.add(tfNIC Card);
c.add(lFather/Husband's Name);
c.add(tfFather/Husband's Name);
c.add(lAge);
c.add(tfAge);
c.add(lAddress);
c.add(tfAddress);
c.add(lProvance);
c.add(tfProvance);
c.add(bSave);
c.add(bExit);
/*registering buttons with actionListner*/
bSave.addActionListener(this);
bExit.addActionListener(this);
myFrame.setSize(240,315);
myFrame.setResizable(false);
myFrame.setVisible(true);
} // end initGUI() method
//***********************************************************************************
******
// implementing ActionListener's method i.e. actionPerformed()
public void actionPerformed (ActionEvent event )
{
/*if button bSave generates the event */
if (event.getSource () == bSave)
{
savePerson();
// clear fields
clear();
}
/*if button bExit generates the event */
else if (event.getSource() == bExit)
{
System.exit(0);
}
}// end actionPerformed
//***********************************************************************************
*********************
// used to save person information into DB, using PersonDAO
public void savePerson()
{
/*get values from text fields*/
NIc Card = Integer.parseInt(tfNIC Card.getText());
Father/Husband's Name = tfFather/Husband's Name.getText();
Age = Integer.parseInt(tfAge.getText());
Address = tfAddress.getText();
Provance = tfProvance.getText();
if(NIC Card.equals(""))
{
JOptionPane.showMessageDialog(null, "Please enter NIC Card Number.");
}else
{
/*create a new PersonInfo object and pass it to PersonDAO to save it*/
PersonInfo person = new PersonInfo(NIC Card , father/Husband's Name, Age, address, Provance);
pDAO.savePerson(person);
JOptionPane.showMessageDialog(null, "Record added");
}
}// end GUI
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS301 Assignment # 4 Due Date: 02-Feb-2016 Vuhelper 0 2,370 02-03-2016, 05:38 PM
Last Post: Vuhelper
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,958 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 1,990 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,229 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,294 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 2,024 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,716 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,854 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,753 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,854 01-20-2016, 06:19 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support