logo of the SSW institute
Institut für Systemsoftware
Johannes Kepler Universität Linz
Fachbereich Informatik
logo of the Cristian Doppler Research Association
Christian Doppler Labor
Monitoring and Evolution of Very-Large-Scale Software Systems

Home

General
Staff
Contact
Partners
Alumni

Research
Areas
Projects
Papers
Books
Reports
Awards

Teaching
Lectures
Exams
B.Projects
M.Theses
PhD Theses
Go Abroad

Misc
Library
Seminars
Gallery
Links
Search

Webmaster


logo of the Johannes Kepler University (JKU)
back

WordApp Example - Part 1

  • Create a new NetBeans module suite ("File->New Project...", category "NetBeans Modules"). A module suite is a collection of NetBeans modules.
    screen1

  • Call it "WordApp" and make it your new main project. The main project is started when the command "Run Project" is selected.
    screen2

  • Create a new NetBeans module ("File->New Project...", category "NetBeans Modules").
    screen3

  • Call it "WordEngine" and add it to your previously created module suite.
    screen4

  • Set the code name base to "at.ssw.wordengine".
    screen5

  • Create a new Window Component ("File->New File...", category "Module Development").
    screen6

  • Set the class name prefix to "Text" and the package to "at.ssw.wordengine".
    screen7

  • Now double click on the file "TextTopComponent.java" to open the design view of the window. Create a button and a text area. Select the text area and set the "Variable Name" property of it to "text". This is the name that allows you to access the component from your source code.
    screen8

  • Double click on the button such that an automatic event handling method is created. The method is called whenever the button is clicked. Change the body of the method to the following code.
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
           String s = text.getText();
           s = s.toUpperCase();
           text.setText(s);
        }
        

  • Now you can build and run the application. It will start up a NetBeans instance with your module activated. Select "Window->Text" to open your window component.
    screen9
feedback
back