Monday, September 21, 2009
EJB E-book
Download free e-book
EJB
EJB
EJB
CMP Bean in NetBeans 5.5.1 using MS SQL Server 2005
CMP Bean using Derby Database
EJB [BMP].
EJB [Configure a DataSource]
EJB [Stateful SessionBean]
EJB [Stateless SessionBean] Steps
EJB [Stateless SessionBean]
Enhancements in Java 6
HeadFirst-EJB
Internationalization in Java
Java Beans
ava Mail using Swing
MDB using SJS App Server 8.2 in NetBeans 5.0
Manning.EJB.3.in.Action.Apr.2007
Mastering Enterprise Java Beans
MasteringEJB3rdEd
O'Reilly - Enterprise Java Beans
Wiley-EJB.and.JSP.Java.on.the.Edge
Enterprise JavaBeans, 3rd Edition
bitterEJB
java extreme programming cookbook
proEJB3-javaPersistenceAPI
Java E-book
Java is an object-oriented language similar to C++, but simplified to eliminate language features that cause common programming errors. Java source code files (files with a .java extension) are compiled into a format called bytecode (files with a .class extension), which can then be executed by a Java interpreter. Compiled Java code can run on most computers because Java interpreters and runtime environments, known as Java Virtual Machines (VMs), exist for most operating systems, including UNIX, the Macintosh OS, and Windows. Bytecode can also be converted directly into machine language instructions by a just-in-time compiler (JIT).
Java is a general purpose programming language with a number of features that make the language well suited for use on the World Wide Web. Small Java applications are called Java applets and can be downloaded from a Web server and run on your computer by a Java-compatible Web browser, such as Netscape Navigator or Microsoft Internet Explorer.
Download Free E-book
O'Reilly - Java IO
1000_Java_Tips_low
Advanced Java 2 Platform How to Program (JDK 1.3, J2EE 1.2) 2001
HeadFirst JAVA
Interactive programming in java
J2EETutorial
J2ME_Game_Development_with_MIDP2
Java - J2ME in a Nutshell __found_@_[redsamara.com]
Java 2 Bible Enterprise Edition
Java 2 Network Security
Java 2--Complete Reference2
Java 330_tips
Java Bible Database Programming
Java Programming with Oracle JDBC (2002)
Java
Java_Design_Objects__UML__and_Process
Modeling the J2EE in UML and Rational Rose
O'Reilly - Developing Java Beans-1
O'Reilly - Java 2d graphics
O'Reilly - Java Cryptography
O'Reilly - Java Distributed Computing
O'Reilly - Java Message Service
O'Reilly - Java RMI
O'Reilly - Java Threads 2nd
O'Reilly - Java and XML
O'Reilly - JavaServer Faces
O'Reilly Java Servlet Programming
Teach_Yourself_Java
The Java Language Specification 3rd Ed
Think IN java
Wrox - Beginning Java 2 JDK 5 Edition - 2005
Wrox - Beginning Java 2 JDK 5 Edition - 2005
apress_-_bluetooth_for_java__2003
core java 2, volume i fundamentals 5th
core java 2, volume ii advanced features
O'Reilly - Learning Java
goodbook
j2MEstepbystep
javacryptographyreilly
sybex-javafoundations
Saturday, September 12, 2009
Easy way to study Java :: JInternalFrame
Java Swing Tutorial Explaining the JInternalFrame class. A JInternalFrame is confined to a visible area of a container it is placed in. JInternalFrame a top level swing component that has a contentpane.
- It can be iconified — in this case the icon remains in the main application container.
- It can be maximized — Frame consumes the main application
- It can be closed using standard popup window controls
- It can be layered
JInternalFrame Source Code
import javax.swing.JInternalFrame; |
Output
Java JInternalFrame Hierarchy
javax.swing
Class JInternalFrame
java.lang.Object
|
+–java.awt.Component
|
+–java.awt.Container
|
+–javax.swing.JComponent
|
+–javax.swing.JInternalFrame
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
JInternalFrame Constructor
JInternalFrame()
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with no title.
JInternalFrame(String title)
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title.
JInternalFrame(String title, boolean resizable)
Creates a non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title and resizability.
JInternalFrame(String title, boolean resizable, boolean closable)
Creates a non-maximizable, non-iconifiable JInternalFrame with the specified title, resizability, and closability.
JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable)
Creates a non-iconifiable JInternalFrame with the specified title, resizability, closability, and maximizability.
JInternalFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
Creates a JInternalFrame with the specified title, resizability, closability, maximizability
East way to study Java :: JFrame
JFrame Features
It’s a window with title, border, (optional) menu bar and user-specified components.
It can be moved, resized, iconified.
It is not a subclass of JComponent.
Delegates responsibility of managing user-specified components to a content pane, an instance of JPanel.
Centering JFrame’s
By default, a Jframe is displayed in the upper-left corner of the screen. To display a frame
at a specified location, you can use the setLocation(x, y) method in the JFrame class. This
method places the upper-left corner of a frame at location (x, y).
The Swing API keeps improving with abstractions such as the setDefaultCloseOperation method
for the JFrame
Crating a JFrame Window
Step 1: Construct an object of the JFrame class.
Step 2: Set the size of the Jframe.
Step 3: Set the title of the Jframe to appear in the title bar (title bar will be blank if no title is set).
Step 4: Set the default close operation. When the user clicks the close button, the program stops running.
Step 5: Make the Jframe visible.
How to position JFrame on Screen?
frame.setLocationRelativeTo( null );
JFrame Source Code
import java.awt.*; |
Output
Java JFrame Hierarchy
javax.swing
Class JFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
JFrame Constructor
JFrame()
Constructs a new frame that is initially invisible.
JFrame(GraphicsConfiguration gc)
Creates a Frame in the specified GraphicsConfiguration of a screen device and a blank title.
JFrame(String title)
Creates a new, initially invisible Frame with the specified title.
JFrame(String title, GraphicsConfiguration gc)
Creates a JFrame with the specified title and the specified GraphicsConfiguration of a screen device.
Easy way to study JAVA :: Swing
What is Swings in java ?
- A part of The JFC
- Swing Java consists of
Look and feel
Accessibility
Java 2D
Drag and Drop, etc - Compiling & running programs
- if you do not explicitly add a GUI component to a container, the GUI component will not be displayed when the container appears on the screen.
Swing Model/view design: The “view part” of the MV design is implemented with a component object and the UI object. The “model part” of the MV design is implemented by a model object and a change listener object
Swing is built on top of AWT and is entirely written in Java, using AWT’s lightweight component support. In particular, unlike AWT, t he architecture of Swing components makes it easy to customize both their appearance and behavior. Components from AWT and Swing can be mixed, allowing you to add Swing support to existing AWT-based programs. For example, swing components such as JSlider, JButton and JCheckbox could be used in the same program with standard AWT labels, textfields and scrollbars. You could subclass the existing Swing UI, model, or change listener classes without having to reinvent the entire implementation. Swing also has the ability to replace these objects on-the-fly.
|
In Swing, classes that represent GUI components have names beginning with the letter J. Some examples are JButton, JLabel, and JSlider. Altogether there are more than 250 new classes and 75 interfaces in Swing — twice as many as in AWT.
Java Swing class hierarchy
The class JComponent, descended directly from Container, is the root class for most of Swing’s user interface components.
Swing contains components that you’ll use to build a GUI. I am listing you some of the commonly used Swing components. To learn and understand these swing programs, AWT Programming knowledge is not required.
Java Swing Examples
Below is a java swing code for the traditional Hello World program.
Basically, the idea behind this Hello World program is to learn how to create a java program, compile and run it. To create your java source code you can use any editor( Text pad/Edit plus are my favorites) or you can use an IDE like Eclipse.
import javax.swing.JFrame; |
Output
Note: Below are some links to java swing tutorials that forms a helping hand to get started with java programming swing.
- JPanel is Swing’s version of the AWT class Panel and uses the same default layout, FlowLayout. JPanel is descended directly from JComponent.
- JFrame is Swing’s version of Frame and is descended directly from that class. The components added to the frame are referred to as its contents; these are managed by the contentPane. To add a component to a JFrame, we must use its contentPane instead.
- JInternalFrame is confined to a visible area of a container it is placed in. It can be iconified , maximized and layered.
- JWindow is Swing’s version of Window and is descended directly from that class. Like Window, it uses BorderLayout by default.
- JDialog is Swing’s version of Dialog and is descended directly from that class. Like Dialog, it uses BorderLayout by default. Like JFrame and JWindow,
JDialog contains a rootPane hierarchy including a contentPane, and it allows layered and glass panes. All dialogs are modal, which means the current
thread is blocked until user interaction with it has been completed. JDialog class is intended as the basis for creating custom dialogs; however, some
of the most common dialogs are provided through static methods in the class JOptionPane. - JLabel, descended from JComponent, is used to create text labels.
- The abstract class AbstractButton extends class JComponent and provides a foundation for a family of button classes, including
JButton. - JTextField allows editing of a single line of text. New features include the ability to justify the text left, right, or center, and to set the text’s font.
- JPasswordField (a direct subclass of JTextField) you can suppress the display of input. Each character entered can be replaced by an echo character.
This allows confidential input for passwords, for example. By default, the echo character is the asterisk, *. - JTextArea allows editing of multiple lines of text. JTextArea can be used in conjunction with class JScrollPane to achieve scrolling. The underlying JScrollPane can be forced to always or never have either the vertical or horizontal scrollbar;
JButton is a component the user clicks to trigger a specific action. - JRadioButton is similar to JCheckbox, except for the default icon for each class. A set of radio buttons can be associated as a group in which only
one button at a time can be selected. - JCheckBox is not a member of a checkbox group. A checkbox can be selected and deselected, and it also displays its current state.
- JComboBox is like a drop down box. You can click a drop-down arrow and select an option from a list. For example, when the component has focus,
pressing a key that corresponds to the first character in some entry’s name selects that entry. A vertical scrollbar is used for longer lists. - JList provides a scrollable set of items from which one or more may be selected. JList can be populated from an Array or Vector. JList does notsupport scrolling directly, instead, the list must be associated with a scrollpane. The view port used by the scroll pane can also have a user-defined
border. JList actions are handled using ListSelectionListener. - JTabbedPane contains a tab that can have a tool tip and a mnemonic, and it can display both text and an image.
- JToolbar contains a number of components whose type is usually some kind of button which can also include separators to group related components
within the toolbar. - FlowLayout when used arranges swing components from left to right until there’s no more space available. Then it begins a new row below it and moves
from left to right again. Each component in a FlowLayout gets as much space as it needs and no more. - BorderLayout places swing components in the North, South, East, West and center of a container. You can add horizontal and vertical gaps between
the areas. - GridLayout is a layout manager that lays out a container’s components in a rectangular grid. The container is divided into equal-sized rectangles,
and one component is placed in each rectangle. - GridBagLayout is a layout manager that lays out a container’s components in a grid of cells with each component occupying one or more cells,
called its display area. The display area aligns components vertically and horizontally, without requiring that the components be of the same size. - JMenubar can contain several JMenu’s. Each of the JMenu’s can contain a series of JMenuItem ’s that you can select. Swing provides support for
pull-down and popup menus. - Scrollable JPopupMenu is a scrollable popup menu that can be used whenever we have so many items in a popup menu that exceeds the screen visible height.
Java Swing Projects
- Java Swing Calculator developed using Java Swing. It is a basic four-function calculator java program source code.
- Java Swing Address Book demonstrates how to create a simple free address book program using java swing and jdbc. Also you will learn to use
the following swing components like Jbuttons, JFrames, JTextFields and Layout Manager (GridBagLayout).
Saturday, September 5, 2009
Why Web Services are needed in Industry
Basically Web services mitigate the application integration crisis. It helps integrating applications at a significantly lower price point than any other integration technology.
It’s a new kind of middleware based on XML and the Web. XML and the Web help solve the challenges associated with traditional application-to-application integration like heterogeneity. They are platform and language independent.
Web Services has following advantages:
- Exposing your
API onto a network Connecting Different Applications - Low Cost of communication
- Support for Loosely Coupled Applications
- Web Services are Self Describing using WSDL
- Automatic Discovery using UDDI
- Business Opportunity to grow your business