Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS506 Web Design and Development Assignment No. 02 Solution and Discussion 2014
#1
[B]



CS506 Web Design and Development Assignment No. 02(GRADED) Solution and Discussion 2014 Due Date 10th December 2014


You have to upload only a source code file with (.java) extension. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. For example, if you submit code in .doc (Word document) or .txt files or .exe file, no reward will be given in any case.



Note: Use Notepad or Notepad++ , or NetBeans for coding and JDK package for java source code compilation and running (A video tutorial of JDK installation and configuration is given in course download section)


Objective

The objective of this assignment is

To understanding of User Graphical Interface, layout mangers, frames and Event Handling concepts in java programs.


Problem Statement:

You are required to write a java program which handles the “MouseEvent” by implementing “MouseListener” interface.

Detailed Description:

Develop a GUI component and set the layout using “FlowLayout” manger. The program should have two text fields used for displaying your name and VUID as a default text. There should also be two labels in your GUI. Following four controls should be used in your GUI application.

Student Name (JLabel)
VU ID(JLabel)
Student_Name (JTextField)
VU_ID (JTextField)
Following is the behavior of your GUI Application which handles the Mouse Events program.

When mouse enter the boundary of frame window “default text should be appeared” in the respective textfields i.e. your name and VUID
When mouse exit the boundary of frame window “default text should be removed” from the text fields, it sets empty.
For this your class has to implement the MouseListener interface, MouseListener interface has following five abstract methods.

public interface MouseListener {

public void mousePressed (MouseEvent me);

public void mouseClicked (MouseEvent me);

public void mouseReleased (MouseEvent me);

public void mouseEntered (MouseEvent me);

public void mouseExited (MouseEvent me);

}

But your class will implement the logic in last two methods,

public void mouseEntered (MouseEvent me);

You will write the logic in above method when mouse enter the frame window i.e. setting of text in respective text fields

public void mouseExited (MouseEvent me);

You will write the logic in above method when mouse leaves the frame window i.e. clearing of text in respective text fields

Remaining methods will have an empty body.

Set the frame size “width 300 and height 200”.
You can use the setText(String) method for setting of text of Two JTextField. Use your name and your VUID to store values in these two text fields
When you exit from the program, it should close the frame.
Sample Output:

Mouse enter the boundary of frame window

Mouse exit the boundary of frame window
[/B]

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cs403 Assignment 3 Helping material May 8,2010 viki 1 5,207 04-28-2020, 03:19 PM
Last Post: ClaireBeauc
  cs301 assignment no 3 Solution 20 January 2016 Vuhelper 0 11,093 01-20-2016, 03:32 PM
Last Post: Vuhelper
  CS201 Assignment vo 3 Solution 20th January 2016 Vuhelper 2 2,600 01-20-2016, 03:28 PM
Last Post: Vuhelper
  CS101 Assignment no 3 Solution 20th January 2016 Vuhelper 0 2,284 01-20-2016, 03:25 PM
Last Post: Vuhelper
  SOC101 INTRODUCTION TO SOCIOLOGY assignment no 3 Solution 20 January 2016 Vuhelper 0 1,873 01-20-2016, 03:19 PM
Last Post: Vuhelper
  CS402 Assignment No 4 Solution & Discussion Xpert 0 2,103 08-01-2015, 02:33 AM
Last Post: Xpert
  cs101 Assignment No. 1 Solution 21 may spring 2015 semester Xpert 0 2,912 05-21-2015, 12:41 AM
Last Post: Xpert
  Assignment solution eng 301 due date 20 may 2015 rumesa khan 3 4,538 05-20-2015, 01:34 AM
Last Post: Xpert
  PHY301 Circuit Theory Assignment No. 1 idea Solution spring may 2015 semester Xpert 0 1,563 05-15-2015, 03:52 AM
Last Post: Xpert
  Assignment No. 01 Spring 2015 Information Systems CS507 idea solution spring 2015 Xpert 0 2,451 05-15-2015, 03:49 AM
Last Post: Xpert

Forum Jump:


Users browsing this thread: 1 Guest(s)