I'm Constantin DRABO from Ouagadougou, Burkina Faso. I'm fervent advocate of Java technologies and Linux based plateforms. So, I contribute to several open source communities such as NetBeans , Java, Fedora and Google. Drabo has posted 12 posts at DZone. You can read more from them at their website. View Full User Profile

Create your First ExtJS 4 Application with NetBeans IDE

  • submit to reddit

This article shows you a quick start for setting up NetBeans IDE for ExtJS 4 application development.

ExtJS is a "Cross-Browser Rich Internet Application Framework". It is based on JavaScript and web standards that help developers build pretty applications supported by several browsers. You can find more information (http://www.sencha.com) about this framework.

I've found the HTML5 features in NetBeans to provide excellent support for building an ExtJS application, as shown below. 

Create an empty HTML5 project

The first thing to do is create an empty HTML5 project in NetBeans by following the tutorial on the official website, that is, Getting Started with HTML5 Applications . 

  • "New Project -> HTML/Javascript -> HTML5 Application"  and click on "Next"  button.
  • Give a name to your project ( I choosed TutoExtJS) and  click on "Finish" button .

Download ExtJs 4

In order to have the ExtJs 4 librairies, you need to download the framework on Sencha website (sencha ).

  • Unzip the file in a temporary directory  and rename it as you wish ( I renamed mine "ext").
  • Create a directory on your project  were you will upload the extjs librairies directory  :
  • Right-click on the node "Site Root"  ->  "New -> Other -> Folder" and give a name to the folder ( I gave  "js").
  • Copy the  extjs directory and paste into the  js node ( image below)

Write your application

Now we are on the way to write our first  ExtJs application based on NetBeans

1 - Create the index.html

The index.html file is created by default. We will just replace the content with the code below :

<!DOCTYPE html>
    <title>Account Manager</title>
    <link rel="stylesheet" type="text/css" href="js/ext/resources/css/ext-all.css">
    <script type="text/javascript" src="js/ext/ext-all.js"></script>
    <script type="text/javascript" src="test.js"></script>

2 - Create the javascript file test.js

Right-click on the project node => New => Other => JavaScript file  and give a name ( in the tutorial I named it test.js).

Replace the content of the new file by the code below :

function createNetBeansWin() {
    var win  = new Ext.create('Ext.Window', {
        id : 'myWindow',
        title : 'My first ExtJs Window with NetBeans',
        width : 300,
        height : 150,
        layout : 'fit'

Your application is ready. Just run the application by right-clicking on the project and  "Run".

Published at DZone with permission of its author, Drabo Constantin.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Sean Phillips replied on Fri, 2013/07/12 - 5:17pm

Nice Drabo.   Finally an article to convince my HTML5 coworkers to use NetBeans!

I'm not particular big on Web Development anymore but I recognize its strength.  An article like this makes me want to try it out through my beloved NetBeans.

Drabo Constantin replied on Tue, 2013/07/16 - 10:03am in response to: Sean Phillips

Thanks Phillips ! NetBeans is becoming strong, many surprises are coming, you should start adopting it.

Ray Naa replied on Fri, 2014/09/12 - 7:59am


Thank you so much for the post you do. I like your post and all you share with us is up to date and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job.

Ray Naa replied on Mon, 2014/09/15 - 6:59pm in response to: Ray Naa


Great article with excellent idea!Thank you for such a valuable article. I really appreciate for this great information..
Veritas Inc

Ray Naa replied on Wed, 2014/09/24 - 3:15pm

Love the instructors here at Bright Spanish!! They are so intelligent and really helped me learn Spanish easily.
learn spanish

Ray Naa replied on Wed, 2014/09/24 - 5:23pm


It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing.

Ray Naa replied on Thu, 2014/09/25 - 12:44pm


Wonderful article, thanks for putting this together! This is obviously one great post. Thanks for the valuable information and insights you have so provided here.
elsa games

Ray Naa replied on Thu, 2014/09/25 - 1:56pm


It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing.

Ray Naa replied on Sun, 2014/10/05 - 1:46pm


I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.
Family Magic Box

Ray Naa replied on Sun, 2014/10/19 - 1:12pm


Admiring the time and effort you put into your blog and detailed information you offer!..
Top 10 Sites

Ray Naa replied on Mon, 2014/10/20 - 6:12pm


While scouring the web for real estate news, I found a housing market news page, <a href="http://ochousingnews.com/">OC Housing News</a>. The housing news and real estate analysis on the site is super, the cartoons and writing are entertaining and insightful, and the real estate educational materials are fantastic. I advise discovering this Internet site to tour what it has to offer.
Orange County Housing News

Ray Naa replied on Sun, 2014/10/26 - 3:32pm


i was just browsing along and came upon your blog. just wanted to say good blog and this article really helped me.
apple repair miami

Ray Naa replied on Thu, 2014/11/13 - 9:17am


Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject!
how to make money online

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.