Tuesday, November 24, 2009

Make Calc With Java Programming

You can Download The Source Here...

Sunday, November 22, 2009

Thinking in Java

“This book is a tremendous achievement. You owe it to yourself to have a copy on your shelf. The chapter on iostreams is the most comprehensive and understandable treatment of that subject I’ve seen to date.”download here

Web Framework



In broad terms, a software framework is a code library
that is designed to help software development.
(ref. en.wikipedia.org [c] )
A framework is a set of related classes and other

supporting elements that make application
development easier by supplying prebuilt parts.

Framework software object-oriented
download here

Using Java Development Tools With Eclipse



In the following sections we’re going to look in more detail at the capabilities and use of the Java tools. We’ll start with an overview of the JDT user interface and the fundamentals you’ll need for creating and navigating Java resources. We’ll then look in much more detail at JDT capabilities for coding Java

An Eclipse GUI Builder



In this tutorial, we describe how to use a GUI Builder plug-in for Eclipse, as well as look at its features. The GUI Builder that we will look at in this tutorial is the Designer created by Instantiations, Inc., and is available at http://www.swt-designer.com. We will be using version 2.0.0 of the Designer in this tutorial.download here



Installing Eclipse













In this document, we describe the installation of Eclipse on Windows and Linux platforms and the creation of a simple Java program that uses the SWT. We have attempted to note common problems that affect the install and provide solutions to these problems. We used Windows XP Professional with the Java 1.6.0 JRE and Eclipse as the primary platform for illustrating the use of Eclipse, but issues specific to Linux (both GTK and Motif) are also described at the end of this document.
download here

Tuesday, November 10, 2009

OOP in Java

Book Review :
No review....
Download here.

Lewis Lotus (Java Fundamental)
















Focuses On :
  • components of a computer
  • how those components interact
  • how computers store and manipulate information
  • computer networks
  • the Internet and the World Wide Web
  • programming and programming languages
  • an introduction to Java
  • an overview of object-oriented concepts
download here

Java Socket


Section 1. Tutorial tips
Should I take this tutorial?
Sockets, which provide a mechanism for communication between two computers, have been around since long before the Java language was a glimmer in James Gosling's eye. The language simply lets you use sockets effectively without having to know the details of the underlying operating system. Most books that focus on Java coding either fail to cover the topic, or leave a lot to the imagination. This tutorial will tell you what you really need to know to start using sockets effectively in your Java code. Specifically, we'll cover:
  • What sockets are
  • Where they fit into the structure of programs you're likely to write
  • The simplest sockets implementation that could possibly work -- to help you understandthe basics
  • A detailed walkthrough of two additional examples that explore sockets in multithreaded and pooled environments
  • A brief discussion of an application for sockets in the real world
If you can describe how to use the classes in the java.net package, this tutorial is probably a little basic for you, although it might be a good refresher. If you have been working with sockets on PCs and other platforms for years, the initial sections might bore you. But if you are new to sockets, and simply want to know what they are and how to use them effectively in your Java code, this tutorial is a great place to start.




Introduction Java Foundation Class


The Java Foundation Classes bring new capabilities to the Java programmer, foremost among which are the components in the so-called Swing set.This chapter begins by looking briefly at the history of the Java programming la guage and of the Abstract Window Toolkit in particular. The Abstract Window Toolkit, or AWT for short, provides the classes used to build an application’s user interface. In both Java Development Kit (JDK) 1.0 and JDK 1.1, Java applications running under Windows looked just like Windows programs, while those running on Solaris looked the same as native applications written with the Motif toolkit. The reason for this was simply that much of the AWT is provided by code from the native platform’s windowing system—the user interface components are rendered by Windows or by Motif, not by Java code. While this has its advantages, it also has drawbacks. For one thing, it is difficult to implement a single interface and map it to two (or more) host platforms that work differently. And even when you’ve done that, the controls themselves behave somewhat differently between the platforms. Because this behavior is part of the native windowing system, there’s nothing you can do about it.

Implementing all of the user interface classes in Java gets rid of these problems at a stroke. hat’s exactly what the Swing components, which are the most significant part of the Java Foundation Classes (JFC), do—they replace the native
implementation with a user interface library that works the same on all Java platforms.

This chapter starts by looking at the history of the Swing project and then moves
on to look at the new architecture that was developed to implement the Swing controls. The power of this architecture will be shown toward the end of the chapter,when you’ll see how simple it is to change the way an application built with Swing controls looks, without changing a single line of code.

Distributed Programming with java


Distributed Programming With Java Technology provides you with the knowledge and skills necessary to program distributed computing applications using the distributed technologies from JavaSoft:

  • JavaTM Database Connectivity (JDBCTM) application programming interface (API) Remote Method Invocation (RMI) API
  • JavaIDL (Java interface definition language) API
  • Java technology servlets (Java servlets)
You will also learn about the supporting technologies, such as Java Transaction Services (JTS), Java Naming and Directory Interface (JNDI), and Java Message Service (JMS). At the end of the course, the knowledge gained should enable you to make informed decisions about which technology is best used under which circumstances.

This course is concerned with providing you with the skills and concepts necessary to solve distributed computing problems using the four distributed computing technologies from JavaSoft
  • JDBC
  • RMI
  • JavaIDL
  • Java servlets
Issues related to distributed programming, such as a naming or transaction service, persistent objects, or security issues with remotely loaded code, are also addressed in this course.
download here





Pro NetBeansTM IDE 6 Rich Client Platform Edition


In the beginning, code was written using simple text-based tools like Notepad. For the pur-poses of this discussion, I’ll define “beginning” as the early to mid-1990s, when Java first started to become popular. Using the combination of a text editor and command prompt, users could write and compile code.
It was quickly determined that this approach did not provide the most efficient development environment. For example, if you made a code syntax mistake in the text editor, there was no way to identify the problem until you saved and compiled the file. You would then review the compilation error, locate the offending line in the code, and attempt to determine the cause.Compilation errors are not alwas entirely helpful in diagnosing a problem with your code.
Many novice programmers start out using the Notepad and command-prompt environ-
ment. There is nothing inherently wrong with this approach, since some professionals still do the same thing. For an absolute beginner learning Java, using a plaintext editor can sometimes be the easiest and fastest approach. However, text editors do not provide assistance with language syntax, compiler integration, intelligent refactoring support, or other code-writing capabilities.
Some text editors provide more advanced support for programming languages. The popular Unix-based tool Emacs offers many interesting features, including advanced text matching and replacement capabilities. Through plugins, it can also provide Java syntax highlighting, code indentation, basic debugging, and compilation support. These are great pieces of functionality, but they still do not offer the most flexible and productive environment.
The first question anyone who uses Emacs or text editors might ask is, “Why use an IDE?” Some programmers tend to grow attached to a specific tool set or programming language and are resistant to change. An important quality in today’s ever-changing world is the ability to
adapt to new technology.
New tool sets can help professional programmers in many ways. As a programmer, your time should be spent writing code, rewriting code, and testing code. You shouldn’t need to waste time trying to figure out how to rename methods across your code, generate project documentation, or correctly compile all the classes in a package. Once you have identified the action you need to perform, your tool should do it for you easily.
Integrated development environments (IDEs) literally provide an entire environment for your work. They bring together many different tools in a coherent way so that the services and actions you need are seamlessly integrated together.
Some technical benefits of IDEs include the following:
• Graphical user interface (GUI) for performing actions
• Grouping of source code and configuration files into the concept of a project
• Tight integration with the compiler
• Coupling with a source code repository
• Ability to performance tune, analyze, and load test code
• Integration with reusable test frameworks
• Capability to utilize third-party plugins and tools
• Ability to debug code by executing one line at a time
• Quick access to and ease of generating project documentation
Some of the more tangible business benefits of using an IDE include the following:
• Reduces the cycle time of development
• Increases the quality and reliability of your code
• Standardizes your software development processes
• Provides a common platform for programming staff to reduce training time

Some of these benefits are definitely arguable and can sometimes be realized only after careful analysis, implementation, and execution. Many other factors come into play, but a really good Java IDE tool can be the foundation for accomplishing important milestones such as the examples I provided.
NetBeans is my Java IDE of choice. This might be obvious, since I wrote this book, but I have many valid reasons for loving and using NetBeans. My experience with development tools covers a wide range of products, such as Notepad, TextPad, Emacs, vi, Macromedia UltraDeveloper, Macromedia Dreamweaver, Oracle JDeveloper, IntelliJ IDEA, Borland
JBuilder, Microsoft Visual Studio, and Eclipse. Each of these tools has its pros and cons. They all have devoted users and entire communities centeed around them. After a while, distinguishing between the tools can be difficult, since they offer many similar features. I was on the fence deciding between IntelliJ IDEA and Eclipse. After only a few hours of working with NetBeans and viewing various tutorials, I was convinced. I downloaded, installed, and started working with it. I quickly discovered that the features were located in places I expected them to be, they functioned as Ithought they would, and there were few or no configuration issues. In my opinion, that is how a tool should function out of the box.In no particular order, the top ten reasons I think programmers should use NetBeans over another Java IDE are summarized as follows: Intuitive and easy-to-use Matisse GUI designer for Swing development: With little or no Swing knowledge, users can be up and running, dragging-and-dropping elements into a WYSIWYG design window. The Matisse GUI designer actually generates real Swing code and not the usual boilerplate fluff code many tools tend to create. At the last JavaOne conference I attended, I sat next to a gentleman who used the GUI design capabilities of JBuilder. After only two minutes of watching me use Matisse, he was completely blown away and ran off to download it for himself. Strong refactoring support: This is particularly true for the Jackpot engine, allowing for Java type-aware refactoring using a regular expression-like query language. Designed by James Gosling, the query language is quite simple to use and allows for pattern matching and replacement. The interesting aspect to the queries is that they can be tested to match specific Java types or instances of objects. One of the best code profilers: Given that I haven’t used every code profiler out there, but with an amazing array of options, I consider the NetBeans Profiler to be among the best.Users can profile for memory, CPU, and performance problems as well as monitor threads. The NetBeans 6 Profiler introduces the concept of profiling points. The Profiler can also be attached and detached from a currently running process or application. It provides 32-bit and 64-bit support as well as allows you to profile Enterprise JavaBeans(EJB) modules and enterprise applications. For those Mac fans in the crowd, it also supports profiling on Mac OS X Intel systems. UML project support: Programmers can create a Unified Modeling Language (UML) project for modeling code, process steps, or design patterns. UML projects can be linked directly to Java projects. As a user creates and modifies the UML objects and diagrams, the corresponding Java code is generated automatically. If the source code in the linked Java project is changed, the diagram is also updated automatically. With the ability to export diagrams, generate code, and create web-based project reports, the UMLproject feature is one of the coolest additions to NetBeans that I have enjoyed using.

Ant integration: Java projects in NetBeans are structured using Ant build files. When a project is first created, the IDE generates the build script and associated targets. Users can then trigger specific targets or completely customize the structure of their build file to suit the needs of their project. For users unfamiliar with Ant, there is almost no impact, since execution of Ant targets is linked directly to the menus and buttons in NetBeans. Many users will also find it easy to import existing build files from external projects and quickly get up to speed. For beginners, it is ridiculously easy to use. For experts, it is ridiculously easy to customize.

J2ME mobile application support: Even if you don’t do much mobile application development, after viewing the samples and reading an introductory tutorial, you should quickly see the power of NetBeans mobile tools. The sample applications provided are impressive enough as it is. With support for Java 2 Micro Edition (J2ME) Mobile Information Device Profile (MIDP) 2.0, a visual mobile designer, a wireless connection wizard, and over-the-air download testing, mobile application developers have some impressive and powerful tools.Developer collaboration tools: Developers can log in to a public or private environment and share code. You can join public conversations or start your own restricted private ones. One of the greatest features I’ve seen in a while is the ability to drag-and-drop code or entire projects in the chat window and share code with one or moreprogrammers.

NetBeans supports multiuser team coding. As one user starts to change a block of code,it is highlighted and locked for the other users sharing it. In the current global economy,where development teams are spread across numerous locations, this tool can prove verybeneficial.

Easy-to-use Update Center: The NetBeans Update Center allows you to quickly select which update distribution sites you wish to check for changes, updates, and new modules. You can also choose to install modules that you previously downloaded but chose not to install. The Update Center is more intuitive than many other Java IDE update tools and makes updating NetBeans a snap. Out-of-the-box JSP and Tomcat support: NetBeans comes bundled with Apach Tomcat.

Once you have used the New Project wizard to create a web application project, you can create your JavaServer Pages (JSP) files. Then you can right-click any JSP file and select Run File. The bundled Tomcat server starts immediately, your default Internet browser opens, and the JSP file executing in Tomcat is displayed. NetBeans is even smart enough to activate the HTTP Monitor.

NetBeans HTTP Monitor: I do a lot of web-related Java development. To me, this is one of the coolest and most unique features of any Java IDE on the market. The HTTP Monitor can be activated during the debugging or execution of a web application. It allows you to monitor the request, HTTP headers, cookies, session, servlet context, and client/server parameters. You no longer need to write server-side code to read these variables, output them to a log, and view the log file. Inside NetBeans, you can debug your code, step line by line through it, and watch the attributes you need.

These features are only a sampling of what NetBeans has to offer. Other Java IDEs may provide some of the capabilities described here, but none can match the NetBeans IDE’s intuitive interface and integrated tool set. To learn about everything NetBeans has to offer, I invite you to continue reading the rest of the chapters in this book.