We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Assignment No. 02
Semester: Fall 2016
Web Design and Development -CS506
Total Marks: 20

Due Date: December 02, 2016
Instructions:
Please read the following instructions carefully before submitting assignment:
 You should submit your assignment before or on due date on VULMS.
 Your assignment should be your own work. It should not be copied from internet, handouts or books.
 You are suggested to use Netbeans IDE for developing your assignment.
 You should import java swing and java awt packages in your classes.
 You should create project with your Roll No. in Netbean IDE and create required classes in it.
 You should zip your complete project (along with .java,.class and .jar files etc.) and upload on VULMS as a single file.
 Your zipped file should be in .zip or .rar file format only. Any compressed format other than .zip or .rar of your programs will be considered the incorrect files and rewarded by zero.
 Assignment sent via Email will not be replied and accepted in any case.
 If the submitted assignment does not open or file is corrupt, it will not be marked and awarded Zero marks.
Objectives:
• To build knowledge about how event handling works in Java
• To develop basic GUI application
• To know how to use different GUI components of AWT and Swing packages
For any query about the assignment, contact at CS506@vu.edu.pk

Question: Marks 20

You are required to develop a small java program named as “Printer” by creating following Graphical User Interface (GUI) with functionality.

GUI

Functionalities Required

• Print Quality drop down list should contain two values as; High and Low
• Upon Pressing OK button, new dialog box should be opened with the following text;
• “Thanks for using this application” and program must exit successfully.
• Upon Pressing Cancel button, new dialog box should be opened with the following text;
• “You Pressed Cancel Button”.
• Upon pressing Help button, new dialog box should be opened containing following text;
“For more help, please contact CS506@vu.edu.pk”

BEST OF LUCK

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 6138

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

plz yr koi complete solution do

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

import javax.swing.JButton;

import javax.swing.JCheckBox;

import javax.swing.JComboBox;

import javax.swing.JEditorPane;

import javax.swing.JFrame;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import javax.swing.JRadioButton;

public class GUI implements ActionListener {

JFrame frame;

String[] items = { "High""Low" };

public GUI() {

initGUI();

}

public void initGUI() {

frame = new JFrame("Printer");

frame.setBounds(100, 100, 450, 280);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().setLayout(null);

JButton btnNewButton = new JButton("OK");

btnNewButton.addActionListener(new ActionListener() {

@Override

public void actionPerformed(ActionEvent arg0) {

JOptionPane.showMessageDialog(null,

"Thanks for using this application");

System.exit(0);

}

});

btnNewButton.setBounds(325, 56, 117, 29);

frame.getContentPane().add(btnNewButton);

JButton btnCancel = new JButton("Cancel");

btnCancel.addActionListener(new ActionListener() {

@Override

public void actionPerformed(ActionEvent e) {

JOptionPane

.showMessageDialog(null"You Pressed Cancel Button");

}

});

btnCancel.setBounds(327, 125, 117, 29);

frame.getContentPane().add(btnCancel);

JButton btnHelp = new JButton("Help");

btnHelp.addActionListener(new ActionListener() {

@Override

public void actionPerformed(ActionEvent e) {

JOptionPane.showMessageDialog(null,

"For more help, please contact CS506@vu.edu.pk");

}

});

btnHelp.setBounds(325, 191, 117, 29);

frame.getContentPane().add(btnHelp);

JLabel lblPrinterMy = new JLabel("printer : my printer");

lblPrinterMy.setBounds(24, 54, 143, 16);

frame.getContentPane().add(lblPrinterMy);

JLabel lblNewLabel = new JLabel("Print Quality");

lblNewLabel.setBounds(24, 225, 79, 16);

frame.getContentPane().add(lblNewLabel);

JRadioButton rdbtnSelection = new JRadioButton("Selection");

rdbtnSelection.setBounds(234, 86, 141, 23);

frame.getContentPane().add(rdbtnSelection);

JRadioButton rdbtnAll = new JRadioButton("All");

rdbtnAll.setBounds(234, 132, 141, 23);

frame.getContentPane().add(rdbtnAll);

JEditorPane editorPane = new JEditorPane();

editorPane.setBounds(6, 81, 75, 69);

frame.getContentPane().add(editorPane);

JEditorPane editorPane_1 = new JEditorPane();

editorPane_1.setBounds(160, 81, 75, 69);

frame.getContentPane().add(editorPane_1);

JCheckBox chckbxNewCheckBox = new JCheckBox("Image");

chckbxNewCheckBox.setBounds(91, 86, 128, 23);

frame.getContentPane().add(chckbxNewCheckBox);

JCheckBox chckbxNewCheckBox_1 = new JCheckBox("Text");

chckbxNewCheckBox_1.setBounds(92, 120, 128, 23);

frame.getContentPane().add(chckbxNewCheckBox_1);

JComboBox comboBox = new JComboBox(items);

comboBox.setBounds(138, 220, 52, 27);

frame.getContentPane().add(comboBox);

frame.setVisible(true);

}

@Override

public void actionPerformed(ActionEvent e) {

}

}

public class MainGui {

public static void main(String[] args) {

// TODO Auto-generated method stub

GUI gui = new GUI();

}

}

public class MainGui {

public static void main(String[] args) {

// TODO Auto-generated method stub

GUI gui = new GUI();

}

}

Almost correct.

thx.

what is the error plz mention.. @Sehrish Sardar

Cs 506 assignment no 2 solution zip

Attachments:

GUI main start main 'printer' kesy add krein gy?

anyone here?

*************

GM Mughal email , cell no sharing is not allowed at the site..next time be care.thanks for understanding 

RSS

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.