DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. Create your First ExtJS 4 Application with NetBeans IDE

Create your First ExtJS 4 Application with NetBeans IDE

Drabo Constantin user avatar by
Drabo Constantin
·
Jul. 06, 13 · Interview
Like (0)
Save
Tweet
Share
30.67K Views

Join the DZone community and get the full member experience.

Join For Free

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>
<html>
  <head>
    <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>
  </head>
  <body></body>
</html>

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'
    }); 
    win.show();
}
Ext.onReady(createNetBeansWin);


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


application Integrated development environment NetBeans

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Type Variance in Java and Kotlin
  • Choosing the Best Cloud Provider for Hosting DevOps Tools
  • How To Generate Code Coverage Report Using JaCoCo-Maven Plugin
  • Using QuestDB to Collect Infrastructure Metrics

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: