Want to create interactive content? It’s easy in Genially!

Get started free

POP PRESENTATION

Zayed Haque

Created on October 10, 2022

Start designing with a free template

Discover more than 1500 professional designs like these:

Genial Storytale Presentation

Historical Presentation

Scary Eighties Presentation

Psychedelic Presentation

Memories Presentation

Harmony Higher Education Thesis

Terrazzo Presentation

Transcript

Snake game

Zayed HaqueRA2112704010010

Main classes

The main classes will be: 1. DataOfSquare 2. KeyboardListener 3. ThreadsController 4. Window

Modules to be used

Java swing

01

Swing has about four times the number of User Interface [UI] components as AWT and is part of the standard Java distribution. By today’s application GUI requirements, AWT is a limited implementation, not quite capable of providing the components required for developing complex GUI’s required in modern commercial applications. The AWT component set has quite a few bugs and really does take up a lot of system resources when compared to equivalent Swing resources. Netscape introduced its Internet Foundation Classes [IFC] library for use with Java. Its Classes became very popular with programmers creating GUI’s for commercial applications. Swing is a Set Of API ( API- Set Of Classes and Interfaces ) Swing is Provided to Design a Graphical User Interfaces Swing is an Extension library to the AWT (Abstract Window Toolkit) Includes New and improved Components that have been enhancing the looks and Functionality of GUI’s Swing can be used to build(Develop) The Standalone swing GUI Apps Also as Servlets And Applets

Java KeyListener Interface

02

An event which indicates that a keystroke occurred in a component. This low-level event is generated by a component object (such as a text field) when a key is pressed, released, or typed. The event is passed to every KeyListener or KeyAdapter object which registered to receive such events using the component's addKeyListener method. (KeyAdapter objects implement the KeyListener interface.) Each such listener object gets this KeyEvent when the event occurs. "Key typed" events are higher-level and generally do not depend on the platform or keyboard layout. They are generated when a Unicode character is entered, and are the preferred way to find out about character input. In the simplest case, a key typed event is produced by a single key press (e.g., 'a'). Often, however, characters are produced by series of key presses (e.g., 'shift' + 'a'), and the mapping from key pressed events to key typed events may be many-to-one or many-to-many.

Java THREADCONTROLLER

03

Core Java provides complete control over multithreaded program. You can develop a multithreaded program which can be suspended, resumed, or stopped completely based on your requirements. 1.public void suspend() This method puts a thread in the suspended state and can be resumed using resume() method. 2.public void stop() This method stops a thread completely. 3.public void resume() This method resumes a thread, which was suspended using suspend() method. 4.public void wait() Causes the current thread to wait until another thread invokes the notify(). 5.public void notify() Wakes up a single thread that is waiting on this object's monitor.

THANK YOU!