Monday 17 September 2012

Feedback form using jSwing

The above example is a part of the Vienna Project in which several jSwing Controls have been used in order to make a user friendly Feedback form which allows to user to share thier views about the project.It also uses JOptionPane control to display messages to the user.

Sunday 15 July 2012

Authentication Login Form using jSwing



You can create a jForm for a login system in order to authenticate the user access to some other parts of the project by connecting it with the database at the backend.Everytime the user will try to access any wwindow in the given project He'll be redisrected to this form in order to check that he's the right person to access the projects matter and all.

Thursday 12 July 2012

Android Plugin for Netbeans

Have you ever thought of developing Android Applications in Netbeans?? Well your wish has come true.Now a Netbeans Android Development plugin  NBAndroid has been launched using which you can make cool and exclusive your own Android Apps!! Download the plugin here...

Project Vienna jTimer beautiful Mosaic




This is a wonderful illustration of jTimer use to create a Mosaic effect with the pictures that flash on the random condition .Hence it's a blend of jTimer and Math.Random() function in Java Swing.Actually This is the home window of Project Vienna Chemicals which has used jMenu also with the icons to naviagte to different windows in the program.Each and every module of this project uses MySQL Database Connectivity.





Monday 9 July 2012

Dynamic List in JSwing



Its a simple example of list selection events in java swing.It's a sort of dynamic list in which u can move the content from one list to the another on the click event of various buttons.You can also add and remove new items in the list.by specifying the index.

Friday 6 July 2012

A simple program using jSlider



The basic use of jSlider. jSlider is a very potential tool if used wisely.It can have graduated all over it and one  can make out different values by sliding it's thumb.Like in the above example a Temperature Conversion Meter is made which shows the values of both the celcius and Fahreheit on the either side of the Slider.The values on both the side changes as one slides the thumb of the Slider back and forth. 

Wednesday 27 June 2012

Iphone apps Development in Netbeans


Now u can develop iphone apps in Netbeans also.Hav u ever thought Netbeans to be so potential ...Here u can go to find out tutorial guide if u're novice http://appdevsecrets.com/?hop=enochbux..

Animation in Java Netbeans!! Isn't that cool

Now u can do Animation in Java Netbeans using the Java Swing by using the timer and some other tools...
All u need to do is that u hav to make a series of images swung in the flow which will be displayed as the timer runs...

Friday 15 June 2012

Top 10 New Java Features in NetBeans IDE 6.5


the highlights of these are, in my opinion, the following, in order of significance:

  1. Performance Improvements. If there is one area that every Java programmer (indeed, any programmer at all) is interested in, it is performance of their IDE. Discussions on this theme rage all over the web—the IDE that, despite its growing feature set, continues to be (and enhances the extent to which it is) performant is the one where most programmers will flock to. More so than any other (assuming the feature set is competitive), this is the distinguishing feature between IDEs, if the difference between them on this point is significant enough. Even more so than before, NetBeans IDE
  2. Compile & Deploy on Save. One of the key features that has distinguished NetBeans by its absence, 6.5 now includes. Better than describing it in words is to show it in action. Watch the video below for details.
  3. Groovy. More than any other scripting language, Groovy lends itself to handling the heavy lifting of traditional cumbersome Java tasks, without requiring you to make a huge mental shift to start using it. The ease with which this is possible is quite amazing: 
  4. Java Editor Enhancements. An area where NetBeans IDE has consistently improved, while continuing to lag over its peers, is the Java editor, in terms of its performance (see above) and, in particular, its range of refactorings. In fact, any presentation done by any NetBeans presenter (ever, I dare say) has been followed by the question/statement
  5. Code Completion. The jewel of any code editor is, I believe, together with the "hints/tips" feature (so wonderfully represented in IntelliJ), the code completion feature. Any enhancement in this area, after performance, is inevitably very fine grained, which is exactly the level at which code completion is most useful. One enhancement in this area to have made its way into IDE 6.5, is CamelCase code completion: 

Thursday 31 May 2012

Using the JComboBox to make GUI programs

The given illustration is an example of ho we can make use of the the various swing tools in Netbeans to make any program out of our ease.The program I have made can be used for E learning.Its a small scale example of this thing.One can make out more tremendous programs for the same purpose.The program is also using Timer to generate an animation of the +R resonance effect which uses various pictures one after the other to seem as animation....

The database navigator using Connectivity

The following illustration is an example of a database navigator using the swing tools in Netbeans.It has made use of the connectivity with MySQL at the back end and a very interactive front end which has used hot keys or mnemonics to ease the accessibility.

Wednesday 16 May 2012

Configuring Tomcat for developing php in Netbeans.

                             

Top 10 NetBeans IDE Keyboard Shortcuts

Initially for exploration of the features working with mouse may feel fancy but as you continue using the tool for project development and want to concentrate more on task in hand you start finding ways to do things faster. NetBeans IDE 6.1 provides many keyboard shortcuts if used judiciously they can save a lot of developers time. I use certain shortcut keys more often than other keys. This is a list of the keyboard shortcuts for NetBeans IDE which I use in my day to day development tasks. 1. CTRL+F12 Navigate to Member When my class becomes big and there are many methods in the class navigating to a specific method becomes easy with this dialog box.
As soon as I start typing the name of the desired method the dialog contents are filtered for me to select from matching method names starting from what I have typed.
2. SHIFT+ESC Toggle Editor Maximize / Minimize I like working in the fully maximized editor window. SHIFT+ESC maximize the editor window for me and I can work with full concentration. When I need to see other windows I can again press SHIFT+ESC and I get the normal layout of windows back.
3. CTRL+7 Activate Navigator Window When I am in maximized editor mode and I need to navigate to some method, either I choose the method 1 as described above or sometimes I use CTRL+7 to activate the navigator window. The windows other than editor in NetBeans follow a specific pattern, you can type characters and a quick search window appears which selects the most appropriate item from the window according to what is typed in this quick search window.
4. CTRL+/ Toggle Comment For quick commenting of some lines I select those lines and press CTRL+/ to comment all those selected lines. The same lines can be uncommented again by following the same process. 5. ALT+SHIFT+F Format Code This key combination formats my code to the standard Java Code Formatting template. 6. CTRL+0 Activate the Editor When I am in the Navigator window through the shortcut CTRL+7 and I want to navigate back to the editor i press CTRL+0. I do not need mouse to do this navigation and save a lot of time in navigating between windows. 7. CTRL+# Activate different windows These shortcuts are handy for navigating between the different windows. They become very important when I work in maximized editor mode. CTRL+1 - Project Window CTRL+2 - Files Window CTRL+3 - Favorite Window CTRL+4 - Output Window CTRL+5 - Services window CTRL+6 - Tasks Window 8. ALT+INSERT Generate Code When I need to generate getter setters or constructors this key combination brings the Code Generation menu
9. ALT+F7 Find Usages Many a times I want to track all the occurrences of a particular method call. Who is calling my method. This Find Usages dialog comes handy in such times.
10. CTRL+F4 Close Editor Window and CTRL+SHIFT+F4 Close All Editor Windows I use these keys often to close my editor windows and save many mouse clicks.

Android Application Development in Netbeans


Develop Anroid Applications using Netbeans!!
Practice the tutorial now!!

Netbeans Mobile Development Module for Blackberry



A part of the problem of mobile development is that there are so many platforms. Do you want to develop for BlackBerry, Android, Apple products like iPhone or iPad, or Windows Mobile? Pinpointing the best plugin for Java mobile apps depends on your platform, but as you can imagine, there are really only a few good options. One, for Android, I personally do not recommend. Another is for BlackBerry

Thursday 10 May 2012

Tutorial for VFSJFileChooser

VFSJFileChooser


VFSJFileChooser is a Java Swing Component which allows you to browse both remote(FTP, SFTP, WEBDAV, etc.) and local filesystems. It is based on Apache Commons VFS library. VFSJFileChooser is distributed under Apache License 2.0.
VFSJFileChooser was first started to be a plugin of XPontus XML Editor. Later, it was decided to create a library which wouldn't be tied to XPontus API.
VFSJFileChooser supports all the file systems available in Commons VFS.
You can think of VFSJFileChooser as a javax.swing.JFileChooser with the ability to browse remote locations such as FTP, SFTP, etc. VFSJFileChooser has not been designed as a file transfer tool, however it can be easily implemented (2 VFSJFileChooser components and some buttons calling commons-vfs API methods, a queue for file operations, etc.).

C-JDBC


C-JDBC is a free open source database cluster middleware that allows any Java application (standalone application, servlet or EJB container, ...) to transparently access a cluster of databases through JDBC(tm). The database is distributed and replicated among several nodes and C-JDBC balances the queries among these nodes. C-JDBC handles node failures and provides support for checkpointing and hot recovery.

Go To C-JDBC

Sunday 6 May 2012

Web Srevices in Java Netbeans

 

Web services are distributed application components that are externally available. You can use them to integrate computer applications that are written in different languages and run on different platforms. Web services are language and platform independent because vendors have agreed on common web service standards.
Web service applications are deployed to a Java EE application server, such as GlassFish / Sun Java System Application Server.
This page provides links to some of the NetBeans documents and resources that can help you learn how to develop web service applications with NetBeans IDE.

Saturday 5 May 2012

Netbeans Database Connectivity with MySQL.

                                                                             


Molecular Biology Research on NetBeans

I am a Canadian government research scientist working on the molecular biology of somatic embryogenesis in conifers. During my early work on gene expression analysis, I developed the ability to conduct quantitative real time polymerase chain reaction (qPCR) using sigmoidal mathematics, which led to the derivation of two novel functions that evolved into a data processing method I called "Linear regression of efficiency" (LRE). Unfortunately, LRE analysis proved to be too labour intensive when conducted manually using Excel, which was the platform upon which LRE analysis was developed. It was also apparent that without an automated capability, acceptance of LRE as an alternative to current qPCR methods would most certainly be limited, at least in the short term, but this is another story.
After several failed attempts over about 18 months to establish a partner for programming LRE analysis, it occurred to me that it might be possible to do the coding myself, based on the extensive online resources for learning Java, and of course, the availability of the NetBeans IDE. This lead to development of a small Java program, which was released as a supplement to my first publication introducing LRE.
After some failed attempts to develop a full fledged desktop program based purely on Java Swing, it became obvious that the NetBeans Platform could provide the required infrastructure, despite the intimidating prospect of learning how to use it, particularly in view of my limited expertise. Due in part to the resources that have been provided, I was sufficiently successful to produce LRE Analyzer, an open source program that we now routinely use for all of our qPCR work:

As might be expected, many aspects of the program are crudely implemented, but in view of the technical complexity involved, it is a testament to the power of the NetBeans Platform to provide capabilities that allow even a novice to be (reasonably) successful.
Anyway, all of this would not have been possible without these online resources, and I am are thus very grateful for the efforts of the NetBeans team, along with Sun's decision to provide free access to both Java and NetBeans, and of course, to Oracle's decision to continue support for these resources.

Key to the Java EE 6 Platform: NetBeans IDE 7.1



This article provides a tour of the main Java EE 6 specifications and shows how the the NetBeans IDE provides the tools, templates, and code generators to support Java EE 6.


Published March 2012
Downloads:
Download: NetBeans IDE (Java EE distribution)

Introduction

When you begin to grasp the breadth and ambition of the Java EE 6 Platform, which covers  everything from the model (JPA and Bean Validation), to the controller (EJB and Servlets), to the view (JavaServer Faces), a simple entry point is difficult to find.
Enter NetBeans IDE 7.1, which is Oracle’s IDE for the Java Platform, created by the same group of developers who created the Java EE 6 Platform. Here you find tools, templates, and code generators intended to be used in combination with the set of specifications that the Java EE 6 Platform encompasses.
Let’s take a tour through the main Java EE 6 specifications and see how NetBeans supports them, through a set of short explanatory texts and screenshots.

JPA 2.0 and Bean Validation 1.0

The Java Persistence specification defines how relational data is mapped to Java objects, standardizing Object/Relational mapping. In the IDE, a wizard is provided that connects to a registered database (which can also be viewed and changed in a database exploration tool in the IDE), lets you select tables, and then generates Java objects from them.
Each generated Java object is annotated as an entity following JPA 2.0 standards, a persistence.xml file defining the database connection is created, and named queries (such as "Customer.findAll", which maps to an SQL query) are optionally inserted into the Java objects.

As a result, your database is accessible from cleanly generated Java POJOs in a matter of seconds. Either you can now inspect the generated entities and extend them for your own applications (for example, code completion is available to help you get started with the new Criteria API) or you can use the generated entities as a learning device while you become comfortable with the JPA specification.
More generally, to integrate persistence solutions into your application, the IDE offers a number of different code generating mechanisms:

The Bean Validation specification is very closely related to the JPA specification. It defines an API for JavaBean validation based on annotations, such as @NotNull and @Size. Aside from the annotations generated into the entities via the above-mentioned tools, the Bean Validation API is supported via additional wizards that let you generate constraint classes, together with their related configuration files:

EJB 3.1

Earlier releases of the Enterprise JavaBeans specification were complicated and verbose. In contrast, EJB 3.1 is remarkably lightweight, requiring very little coding. Now, EJBs simply help you create a thin and powerful business layer. Think "C" in "MVC" and you've got the idea. In the IDE, when you build them, EJBs are included in the application's WAR file, instead of being archived in separate EAR files, which is one of the great enhancements in EJB 3.1.

Templates are provided by the IDE for creating new beans of various kinds: session bean, timer session bean, message-driven bean, as well as session beans generated from entity classes.

Using the IDE, you quickly see that EJBs are no longer defined by the interfaces they implement. Instead, a session bean is a simple POJO with annotations such as @Stateless and @LocalBean. When Alt-Insert is pressed inside the Java Editor, code snippets can be created, such as code for injecting the persistence.xml file via the @PersistenceContext annotation and referring to it via the JPA EntityManager class.

Further help is provided via code generators, including a wizard for creating new business methods in an EJB, invoked from "Add Business Method" above.
Finally, for each EJB in your application, a new node is added to the application structure in the Projects window, so that you can easily see the artifacts made available by the application.

Especially when the application becomes larger, and manageability concerns become more prominent, such global views into the project structure become more important.

JSF 2.0

Instead of using JSPs, you can now use XHTML files, defined by Facelets, which are now part of the JavaServer Faces (JSF) specification. One benefit is that you can now use CSS to style your view layer. Another advantage is that Facelets supports templating. In the IDE, you can use a wizard to create a Facelets Template file, after which you can use another wizard to create a client of the generated template file.

When working within these files, tools exist in the IDE for extracting a set of tags into a JSF Composite Component, which is a separate XHTML file that can be reused across multiple Facelets files.

In this way, component-based development is supported by JSF 2.0, supported by the IDE. A separate wizard is also provided in the IDE for creating new JSF composite components.
Moreover, JSF pages can be generated from entity classes. When the "JSF Pages from Entity Classes" wizard is selected, you can choose one or more entity classes, and then the IDE will generate four XHTML files for each selected class. Within the generated files, JSF tags are added, enabling common CRUD operations to be performed on the underlying entity classes.

Servlets 3.0

By default, following the Java Servlets 3.0 specification, the IDE does not register a newly created servlet into the application's web.xml file. Instead, the @WebServlet annotation is added to the top of the Servlet class, with the "urlPatterns" attribute defining the URL pattern. That means you don't need to switch between the web.xml editor and the Java Editor. Modifying the URL pattern can be done very easily by changing the annotation on the class. Should a web.xml still be needed, a template exists for creating one.
Within the servlet, press Alt-Insert and then you can, as always, generate code. However, there are some powerful new additions in this code generator. Notably, a wizard can be started for selecting session beans:

Code for injecting the selected session beans is inserted into the file, providing a new @EJB annotation in the place where the above code generator was invoked.

CDI 1.0

The new Context and Dependency Injection specification lets you bind the lifecycle and interactions of stateful components to well-defined but extensible lifecycle contexts. In addition, it lets you inject components into an application in a typesafe way, including the ability to choose at deployment time which implementation of a particular interface to inject.
Since an application that uses CDI must have a file named beans.xml, the IDE provides templates for creating this file. If the file does not exist and you annotate EJBs with @Named, for example, which exposes it for injection via expression language into JSF files, the IDE automatically creates a beans.xml file in the META-INF folder for you. In a JSF Facelets file, when you use expression language to refer to your named EJB, the IDE offers code completion for the class names, as well as the methods within the class. In this way, you can very easily connect your view layer (provided by JSF Facelets files) with your business layer (provided by EJBs).
Furthermore, wizards are provided by the IDE for generating new qualifiers, stereotypes, interceptor binding types, and scope types.

These files conform to the deeper aspects of the CDI specification, helping you to get started with them quickly and avoid discouraging errors early in your learning process.

JAX-RS 1.1

The Java API for RESTful Web Services 1.1 lets you quickly build lightweight web services that conform to the Representational State Transfer (REST) style of software architecture. JAX-RS is a standardized API for building RESTful web services in Java. In REST, you deal with resources, each of which can be referred to with a global identifier, that is, a URI.
These can be created very easily in the IDE. In a session bean, add an @Path annotation, which denotes in JAX-RS 1.1 that the artifact should be exposed as a RESTful resource, and the IDE will immediately pop up a dialog that lets you configure the REST libraries and related resources.

Also, a library of wizards is provided for generating RESTful web services from a number of different sources: entity classes, patterns, and databases.

Once the RESTful web services have been created, another wizard can be used for generating the client that consumes the web service's payload.
Moreover, for SOAP-based web services, additional wizards are available for very specific use cases, such as for generating secure token services, logical handlers, and message handlers.

Conclusion

While code generators and tools such as those described here are great to help you get your feet wet, a danger is that a lot of code is generated that you don't understand and that you therefore do not know how to debug and maintain. The good news is that far less code needs to be generated in Java EE 6 than before, making it far easier to understand and maintain.
Nevertheless, it is advisable to use tools of this kind intelligently. Start small, focusing on specific APIs. Get to know them via the generated code and then slowly extend the application as you become more familiar with the Java EE 6 Platform. Once you are comfortable with the spec, the tools aim to help you become more productive: combining the leanness of the Java EE 6 Platform with the tools in the IDE, you'll be rapidly creating the core of your application.

Hierarchical Web Service Development with NetBeans IDE

The Client also has a Servlet which can be accessed by browser clients. These browser clients use the Web services of the client to access the Web Services of the Server and thus multiple client customers can transact in the online retail store concurrently. There can be multiple instances of the Web Client, each of which can serve multiple customers concurrently, all accessing the same Retail Application Server.

We refer to this as 1st Level Client Web Services.

This model can easily be extended in a similar fashion to another level of clients, 2nd Level Clients, who publish their services based on the 1st level client web services. Both these scenarios are depicted in the diagrams below.



    Fig 1. Ist Level Client with Web Services based on Web Services of Retail Application Server

    Fig 2. 2nd Level Client with Web Services based on Web Services of 1st Level Client


This solution is hierarchical and flexible and scalable. At the same time, it preserves consistency in concurrent client access of a retail database at the Retail Application server.