站内搜索: 请输入搜索关键词

当前页面: 开发资料首页Netbeans 专题添加按钮的功能(初学者指南)(2)

添加按钮的功能(初学者指南)(2)

摘要: This tutorial teaches you how to build a simple GUI with back-end functionality. This tutorial is geared to the beginner and introduces the basic construction of a GUI with functionality. A basic understanding of the Java Programming Language is required.

This is a basic tutorial that takes the approach of teaching programming from the GUI development perspective.

This document takes you through the fundamental concepts of GUI creation and takes the approach taken in many self learning books. We will work through the layout and design of a GUI and add a few Buttons and Text Boxes. The Text Boxes will be used for receiving user input and also for displaying the program output. The Button will initiate the functionality built into the front end. The application we create will be a simple but functional calculator.

Expected duration: 15 minutes

Prerequisites

  • The use should have basic skills in the Java language.
  • The user should be comfortable with using the NetBeans IDE.
  • The user should have already completed the tutorial GUI Building in Netbeans IDE 5.0.

Software Needed for the Tutorial

Before you begin, you need to install the following software on your computer:

Tutorial Exercises


Exercise 1: Creating a Project

The first step is to create a Project, we will name our project NumberAddition.

  1. Choose File > New Project. Alternately, you can click the New Project icon in the IDE toolbar.

  2. In the Categories pane, select the General node. In the Projects pane, choose Java Application. Click Next.

  3. Enter NumberAddition in the Project Name field and specify a path e.g. in your home directory as the project location.

  4. Ensure that the Set as Main Project checkbox is selected. Deselect Create Main Class if it is selected.

  5. Click Finish.



↑返回目录
前一篇: 使用 NetBeans IDE 将 GUI 连接到 Derby 数据库(1)
后一篇: 添加按钮的功能(初学者指南)(2)