Building a Java application with Vaadin Framework in NetBeans

Apache NetBeans gives Java teams a compact workspace for editing, debugging and packaging server-side applications. Its Maven integration, profilers and familiar project structure suit teams that want an IDE without a large setup overhead.

The example combines NetBeans with Java and the classic Vaadin Framework 8.x line to create a small claims application packaged as a Maven WAR. It also separates those older APIs from current Vaadin Flow projects, where dependencies and servlet namespaces differ.

Prepare the Java and NetBeans toolchain

Install a JDK supported by your NetBeans release, then confirm that java and mvn resolve from the terminal. Keep JDK, NetBeans, Maven and Vaadin versions in a project record; mismatched Java levels are a common cause of failed front-end compilation.

Vaadin Framework 8 uses javax.servlet, so Tomcat 9 is a straightforward local target. Newer Tomcat releases use the jakarta namespace and need extra migration work. The NetBeans Javadoc configuration notes can help you generate readable API documentation for the domain classes used by the interface.

Create a Maven WAR project

In NetBeans, choose New Project, Maven Web Application, and name it with the organisation and application, such as au.com.acme.claims. Set packaging to war and create the project without a framework template, because the dependencies below make the supported setup explicit.

Add vaadin-server, vaadin-client-compiler and the matching vaadin-maven-plugin, using one version property for the selected 8.x release. Configure the plugin’s compile and theme goals, refresh Maven, and verify that the dependency tree contains no Flow-only starters or conflicting Vaadin artefacts.

Build the server-side interface

Create a MainUI class that extends UI, then place the form in init(VaadinContent). A practical first screen might combine a text field, combo box, grid and action button. Vaadin turns these server-side component changes into browser updates without requiring a separate JavaScript application.

Keep state in the interface or session while the user enters claim details, and send completed work to a service rather than querying a repository from the component. Use layouts and responsive styles so the same form works on a wide office monitor and a smaller tablet used during site visits.

Design deserves testing across browser sizes and themes because one surface may hide clipping or contrast faults. A useful visual analogy appears in an account of adapting to different court surfaces, where the base material remains constant while alignment and finish must change.

Connect reusable Java services

Introduce a small service class for validation and persistence, then call it from button handlers. Inject dependencies through constructors where practical, keep database credentials outside source control, and translate exceptions into messages that are useful to an Australian claims officer without exposing stack traces.

Document public methods and domain objects with Javadoc, especially validation rules and error meanings. The site’s NetBeans Javadoc walkthrough offers practical ways to configure the tool and keep generated documentation aligned with the source tree.

Run and diagnose the application

Run the WAR on Tomcat 9, open the NetBeans output window, and test validation, navigation, session expiry and failed saves before packaging. Repeat the flow with a slow connection, since server-side Vaadin requests can expose latency that a local machine hides.

For suspected memory growth, capture a heap snapshot before and after a realistic workflow. The companion guide to VisualVM memory analysis shows how to compare retained objects and identify a leaking session or oversized attachment without guessing from response times alone.

Fit the application to Australian use

Australian teams in Sydney, Melbourne and Brisbane commonly maintain Java portals for logistics, education and finance. A common local habit is to coordinate releases across AEST, ACST and AWST, commit through Git, and keep Maven settings outside the repository.

The local market includes small businesses that may prefer a deployable WAR on an existing VM over a container platform, while government tenders can demand accessibility, security documentation and support commitments. If the application stores personal information, assess the Privacy Act 1988 and Australian Privacy Principles before launch; health data may also trigger state and territory rules.

User experience matters in regulated consumer services as well. A discussion of online blackjack platforms illustrates how live data, countdowns and account balances must remain clear under time pressure, principles that transfer to claims status and payment screens without copying the gambling use case.

Compare deployment choices and finalise the release

Select the runtime according to operating controls, then make the trade-off explicit for the team. Local Tomcat supports rapid feedback, while a managed platform can improve patching and uptime when the operational team is prepared for its configuration.

The comparison below focuses on the three routes most relevant to an Australian Java team:

Release readiness

Build and verification

  • Pin the JDK, NetBeans and Vaadin versions.
  • Run unit and browser-level tests.
  • Scan dependencies for known vulnerabilities.
  • Produce signed release artefacts.

Operations and handover

  • Store secrets in the approved secret manager.
  • Document logs, backups and recovery steps.
  • Define retention for personal information.
  • Assign support ownership after launch.
Deployment choice Best fit Advantage Main constraint
Local Tomcat 9 Development and controlled installations Simple setup and fast feedback Manual patching and backups
Managed virtual machine Small and medium businesses Familiar hosting with centralised monitoring Cloud configuration remains the customer’s responsibility
Container platform Multi-service or high-traffic systems Consistent releases and flexible scaling Greater orchestration and operational overhead

A short handover naming the runtime owner, supported browsers, backup process and data-retention rule makes the release easier to operate and audit.