Creating a State Diagram

A State diagram is a visual representation of an application's state machines. It shows the life of an object from birth to death. In this type of diagram, you see the behavior specifying the sequence of states that the object goes through in response to events over its lifetime, and you see the object's responses to those events.

You can use a State diagram when you are working on a real-time process-control application or a subsystem that involves concurrent processing, or when you want to express the behavior of a class over several use cases.

1. Create a UML Project and add a State diagram

1. Choose File New Project.

2. In the New Project wizard:
1. Select Categories UML.
2. Select Projects Platform-Independent Model.
3. Click Next.

3. In the New Platform-Independent Model panel:
1. Type a name for the UML project, such as MyUMLProject.
2. Choose a directory where the project will be stored.

4. Click Finish.

5. In…

NetBeans IDE Keyboard Shortcuts

Ctrl-Space Code completion Esc Close code completion Shift-Space Enter a space without expanding
an abbreviation Alt-F1 Display Javadoc Shift-F1 Search Javadoc Alt-Shift-I Import class Alt-U, G Append get to identifier Alt-U, S Append set to identifier Alt-U, I Append is to identifier Ctrl-Shift-F Reformat selection Ctrl-T Shift one tab to the right Ctrl-D Shift one tab to the left Ctrl-Shift-T Comment out with line comments
("//") Ctrl-Shift-D Remove line comments ("//") Ctrl-W Delete current or previous word Ctrl-E Remove the current line Ctrl-J, S Start recording macro Ctrl-J, E Stop macro recording Ctrl-[ Move insertion point to matching
bracket Ctrl-L Word match - forward Ctrl-K Word match - back Ctrl-F Find Ctrl-H Replace F3 Find next Shift-F3 Find previous Ctrl-F3 Search for word that insertion
point is on Alt-Shift-H Turn off search result highlighting Alt-Shift-O Fast Open class Alt-O Go to source Alt-G Go to declaration Ctrl-M Select next parameter Ctrl-…

Java 1.5 Language Features


This long-awaited enhancement to the type system allows a type or method to operate on objects of various types while providing compile-time type safety. It adds compile-time type safety to the Collections Framework and eliminates the drudgery of casting.

Enhanced for Loop

This new language construct eliminates the drudgery and error-proneness of iterators and index variables when iterating over collections and arrays.


This facility eliminates the drudgery of manual conversion between primitive types (such as int) and wrapper types (such as Integer).

Typesafe Enums

This flexible object-oriented enumerated type facility allows you to create enumerated types with arbitrary methods and fields. It provides all the benefits of the Typesafe Enum pattern ("Effective Java," Item 21) without the verbosity and the error-proneness.


This facility eliminates the need for manually boxing up argument lists into an array when invoking methods that accept var…

Fantastic Features In Net Bean IDE

I downloaded latest Net Bean IDE for my new project in University. There i can create GUI very easily. Yesterday I connect my project folder in to SVN server. Using this latest Net Bean IDE I can very easily connect to SVN server.

Java Bean

JavaBeans are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that the bean can be passed around rather than the individual objects.The specification by Sun Microsystems defines them as "reusable software components that can be manipulated visually in a builder tool".

// public class PersonBean implements { private String name; private boolean deceased; // No-arg constructor (takes no arguments). public PersonBean() { } // Property "name" (note capitalization) readadble/writable public String getName() { return; } public void setName(String name) { = name; } // Property "deceased" // Different syntax for a boolean field …

What Is Hibernate

Hibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database. Hibernate solves Object-Relational impedance mismatch problems by replacing direct persistence-related database accesses with high-level object handling functions.Hibernate is free as open source software that is distributed under the GNU Lesser General Public License.

Hibernate's primary feature is mapping from Java classes to database tables (and from Java data types to SQL data types). Hibernate also provides data query and retrieval facilities. Hibernate generates the SQL calls and relieves the developer from manual result set handling and object conversion, keeping the application portable to all SQL databases, with database portability delivered at very little performance overhead.

LINK: Interview with Gavin King, founder of HibernateHIBERNATE 

Video Transmit Using JMF

Here is One example for video transmit using JMF:

import java.awt.*;

public class VideoTransmit {

private MediaLocator locator;
private static MediaLocator ml;
private String ipAddress;
private String port;
private Processor processor = null;
private DataSink rtptransmitter = null;
private DataSource dataOutput = null;
public static CaptureDeviceInfo di = null;

public VideoTransmit(MediaLocator locator,
String ipAddress,
String port) {

this.locator = locator;
this.ipAddress = ipAddress;
this.port = port;

public synchronized String start() {
String result;
result = createProcessor();
if (result != null)
return result;

result = createTransmitter();
if (result != null) {
processor = null;
return result;


return null;