All the Java’s Men

Java has many frameworks for any of his Platforms.In this following List i collect most important Java Frameworks with short description for any one.

1 – Hibernate

best Framework for working with database [Relational Database] in both

JSE  & JEE platforms.

2 – Spring

Looking for cool framework for building Java Enterprise Application base on

MVC pattern [and many more…].yeah ! Spring is Right choose.

3 – ICEfaces

Ajax ! Ajax ! Ajax and more powerful UI for web application , all of these greate

Tools found in ICEfaces.

4 – RichFaces

Another Great Framework for Java EE UI.Run and Dive it…

5 – GWT [Google Web Toolkit]

do you hear about Google wave ? do you see wave’s UI ? ok.it’s base on GWT.

you can use GWT in Java EE application.

6 – Jakarta Struts

Popular Framework for building Java Web Application base on MVC pattern.

7 – Seam

Seam is a powerful open source development platform for building rich Internet applications in Java. Seam integrates technologies such as Asynchronous JavaScript and XML (AJAX), JavaServer Faces (JSF), Java Persistence (JPA), Enterprise Java Beans (EJB 3.0) and Business Process Management (BPM) into a unified full-stack solution.

8 – Apache Tapestry

Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server.


9 – Apache Wicket

With proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again. Swap the boilerplate, complex debugging and brittle code for powerful, reusable components written with plain Java and HTML.

10 – Apache MyFaces

Apache MyFaces is a project of the Apache Software Foundation, and hosts several sub-projects relating to the JavaServer(tm) technology. If you want to know more about how JavaServer(tm) Faces works, take a look at the MyFaces introduction to JSF

11- Spring Roo

Spring Roo is a lightweight developer tool that makes it fast and easy to deliver instant results. Best of all, you code 100% in Java and get to reuse all your existing Java knowledge, skills and experience. You’ll like it – and have plenty of fun too!

12 - jspx – bay

jspx-bay, commonly referred to as jspx, is a free open source pure java web RADJspx is built over Java EE servlets and extending its nature to provide OOP model for HTML Declarative Code.


Posted in Core Java | Leave a comment

How to write a Custom swing component ?

Scenario :

make label, when user click on it go to specific URL.also mouse cursor change to hand symbol.

How :

1 – we must provide a class and extend JLabel class


public class LinkLabel  extends JLabel {

2 – users [other developers] must initiate our component with  3 Arguments  :

URL  ,   Text , Color.

Therefore , we must provide a constructor with 3 arguments for our component :

public LinkLabel(String url, String text, Color c)
{

3 – how change mouse cursor ? easy ! in constructor write following code :

setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

4 – how open default browser of user and show specific URL ?

Desktop class comes with JDK 6  provide powerful solution for this work.

4-1 ) import this package : java.awt.Desktop

4-2 ) we must write Mouse Listener for our component and catch mouse click then

show specific URL into user’s default broswer :

Desktop desktop=Desktop.getDesktop();
URI uri=new URI(url);

desktop.browse(uri);

5 – complete !

import java.awt.Color;
import java.awt.Cursor;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.*;
import java.awt.Desktop;
import java.net.URI;

public class LinkLabel extends JLabel {

 private String url;

 public LinkLabel(String url,String text,Color c)
 {

 setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

 setForeground(c);

 setText(text);

 this.url=url;

 LinkLableListener linkLabelListener=new LinkLableListener();

 addMouseListener(linkLabelListener);

 }

 class LinkLableListener extends MouseAdapter{

 @Override
 public void mouseClicked(MouseEvent e){

 try{
 Desktop desktop=Desktop.getDesktop();

 URI uri=new URI(url);

 desktop.browse(uri);
 }catch(Exception ex){}

 }

}

Posted in Swing | Leave a comment

Right-to-Left JTextArea

do you need change Orientation of JTextArea to Right-to-Left(or vise versa) ?

textArea.setComponentOrientation( ComponentOrientation.RIGHT_TO_LEFT);

Posted in Core Java | Leave a comment

Abstract class VS Interface in java

1 - each method in interface is implicitly abstract , so the abstract modifier is not used with interface methods.

2 – Abstract class is contains abstract methods and fields that are not static and final.

3 – If an abstract class contains only abstract method declarations, it should be declared as an interface instead.

4 – Abstract classes cannot be instantiated, but they can be subclassed.

Posted in Core Java | Leave a comment

install Maven 2 into Ubuntu 10.04

if you want install Maven into Ubuntu 10.04 not far away,it’s easy like drinking water ! using Synptic Package Manager from system > Administration.searching for maven2 and install it.Done !


now you can test maven from terminal.go to terminal and type :

$mvn -v

Result should like below:

Apache Maven 2.2.1 (rdebian-1)
Java version: 1.6.0_20
Java home: /usr/lib/jvm/java-6-sun-1.6.0.20/jre
Default locale: en_US, platform encoding: UTF-8
OS name: “linux” version: “2.6.32-21-generic” arch: “i386″ Family: “unix”

Posted in Maven | Leave a comment

Websites based on JEE

which website using JEE [Java Enterprise Edition] Technologies ?

1 – SonyEricsson

2 – BLACK & HAYDEN

3 – ebay

4 – [4shared] [see signup page URL]

Posted in JEE | 2 Comments