Академический Документы
Профессиональный Документы
Культура Документы
TOOLS
J CREATER, NOTEPAD++
3 KAMAL DEEP(Project Coordinator)
MEMBERS : MENTOR :
DEPLOYMENT
BUSINESS LOGIC : JAVA FRAMEWORK,AWT GRAPHICS,EVENTHANDLING
SERVER :LOCALHOST
INTRODUCTION :It is made completely on JAVA technologies like AWT, Socket Programming, File Handling, etc. AWT is used here for the design of the interface i.e. the easy to use n navigate GUI interface. Socket Programming used here is for opening the port for data to be written by clients (ChatClient.jar) and reading the data (By other client). File Handling is used here is for storing the information that are needed in the course of the execution of data (data.properties, server.properties) like proxy details, room details, last login, host details, etc.
Panel Window
TextField
TextArea
LayoutManager
CheckBoxGroup Canvas
MenuComponent
MenuItem MenuBar
Menu
Scrollbar
GRAPHICS
One of the most important features of Java is its ability to draw graphics. We can write Java applets that can draw lines, figures of different shapes, images, and text in different fonts, styles, and colours. Every applet has its own area on the screen known as canvas, where it creates display. Java coordinate system has the origin (0,0) in the upper-left corner. Positive x values are to the right and +ve y values to the bottom. The values of (x,y) are in pixels.
6
What is an Event?
GUI components communicate with the rest of the applications through events. The source of an event is the component that causes that event to occur. The listener of an event is an object that receives the event and processes it appropriately.
Handling Events
Every time the user types a character or clicks the mouse, an event occurs. Any object can be notified of any particular event. To be notified for an event,
The object has to be registered as an event listener on the appropriate event source. The object has to implement the appropriate interface.
Prepare to accept events import package java.awt.event Start listening for events include appropriate methods Respond to events implement appropriate abstract method
Types of Events
Below, are some of the many kinds of events, swing components generate.
Act causing Event User clicks a button, presses Enter, typing in text field User closes a frame Clicking a mouse button, while the cursor is over a component Listener Type ActionListener WindowListener MouseListener
MouseMotionListener
ComponentListener
ListSelectionListener
Adapter Classes
Time consuming to define all interface methods WindowListener has seven methods What if we only want to use one? Required to define all methods in interface Adapter class implements an interface Does anyone recognize a design pattern here? Default implementation ({ }, empty body) for all methods You then extend adapter class, overriding methods for events you care about, such as windowClosing. Has "is a" relationship with interface WindowAdapter is a WindowListener MouseAdapter is a MouseListener
LOGIN
PRIVATE CHATTING
SELECT ROOMS