In previous lecture we learned how to create views and graphics in iphone. We also learned how to create complex graphics like stars, triangle in iphone using CoreGraphics (CG). In this lecture we’ll continue on that discussion of creating animated views.
When creating images from context we need to dynamically generate a bitmap image. Similarly as [...]
The Model-View-Controller (MVC) design pattern is a way of dividing your code in to independent functional areas. iPhone applications uses MVC design pattern. The model portion of MVC defines your application’s underlying data engine and is responsible for maintaining the integrity of that data. The view portion defines the user interface for your application and has no explicit knowledge of the origin of data displayed [...]
Programs are just another kind of data. Source code is text. It is manipulated line by line, or by parsing expressions. Compiled programs are data, too. Integers and strings are bytes in memory that you interpret a certain way. Instructions in methods are just bytes too. No reason why a program can’t inspect itself.
Reflection is commonly used by programs [...]
Sometimes, the best way to solve a problem is by solving a smaller version of the exact same problem first Recursion is a technique that solves a problem by solving a smaller problem of the same type.Recursion is a problem-solving approach that can be used to generate simple solutions to certain kinds of problems that would [...]
A queue is an ordered collection of items from which items may be deleted at one end (called the front of the queue) and into which items may be inserted at the other end (called the rear of the queue). A Queue can be implemented using arrays and using linked list structure. In this [...]
JDBC provides Java applications with access to most database systems via SQL. The architecture and API closely resemble Microsoft’s ODBC. JDBC classes are contained within the java.sql package. There are few classes and several interfaces. [Download Java Programming with Oracle JDBC]
JDBC is an interface to communicate with a relational database. It treats database [...]
A datagram socket is used to send and receive datagram packets. A DatagramSocket object is a local connection to a port that does the sending and receiving. There is no distinction between a UDP socket and a UDP server socket. Also unlike TCP sockets, a DatagramSocket can send to multiple, different addresses. The address to which data goes is [...]
An I/O Stream represents an input source or an output destination. A stream can represent many different kinds of sources and destinations, disk files, devices, other programs, etc. Streams support many different kinds of data simple bytes, primitive data types, localized characters, and objects. Some streams simply pass on data; others manipulate and transform the data in useful ways. Data is [...]
A collections framework is a unified architecture for representing and manipulating collections. It has:
Interfaces: abstract data types representing collections
Implementations: concrete implementations of the collection interfaces
Algorithms: methods that perform useful computations, such as searching and sorting
These algorithms are said to be polymorphic: the same method can be used on different implementations. A collection [...]
You can draw strings, lines, rectangles, ovals, arcs, polygons, and polylines, using the methods in the Graphics class.
paintComponent Example:
In order to draw things on a component, you need to define a class that extends JPanel and overrides its paintComponent method to specify what to draw.
Another Example:
You can call repaint() when [...]
Popular Posts (last 30 days)
- Attendance Management System 1504 view(s)
- Advanced Java Tutorial (For Intermediate) 744 view(s)
- JAVA Graphical User Interface (GUI) 668 view(s)
- Graph Implementation in C++ 509 view(s)
- File Handling using Input-Output Streams in Java 427 view(s)
- Linked lists in C++ 400 view(s)
- Sockets and Network Programming in Java 349 view(s)
- UDP Datagram Sockets in Java 335 view(s)
- Applications of Stack in data structures 325 view(s)
- Circular Linked Lists 304 view(s)
