Website Button Examples Button Download Image Free. Free Buttons is a ready-made, professional solution that allows webmasters to create superior, cross-browser. Code Examples from Java Swing, 2e The Swing-ified button. Getting Started With the Net. Beans IDE Blue. J Plugin. Articles Index. Blue. J is an integrated development environment (IDE) specifically designed for teaching students object- oriented programming using the Java programming language. Although Blue. J covers the introductory phase of learning to program, the Net. Java Swing Address Book. Java has evolved to be the most predominant and.Beans IDE offers powerful tools for professional developers. Taking the inevitable step from one into the other has been a difficult barrier for students - - until now. The collaboration of the Net. Beans IDE and Blue. J teams has resulted in the Net. Beans Blue. J plugin. This tool creates a smooth migration path for students learning the Java programming language from beginner's stage through to the use of professional development tools. In addition, this IDE provides a seamless path for students to switch from educational tools into a full- featured, professional IDE. The Blue. J plugin makes the transition between these two environments easier for students and teachers. Even if you are not familiar with Blue. J, the Net. Beans Blue.
J plugin is a great way to learn to use an IDE. This article gets you started using the Net. Beans Blue. J plugin. First, you'll discover how easy it is to load existing projects and edit them, and then you'll learn to create a new project and use drag- and- drop features to create a graphical user interface (GUI). Developers unfamiliar with the Blue. J software will also learn everything they need to get started with this IDE and will benefit by following along with the examples. To follow the descriptions and code examples, download the Net. Beans IDE version 6. In addition, download the Blue. J project Calculator. In the second part of the article, you create a small application called Address Book to learn various other IDE features. Setting Up the Net. Beans Blue. J Plugin. Once you have installed and opened the Net. Beans IDE, go to the Tools menu and select Plugins. Click the Available Plugins tab, and scroll down to select the box next to Blue. J Project Support as shown in Figure 1, then click the Install button. Once you accept the license, the plugin will be installed and ready to use. Figure 1: Installing the Blue. J Project Support Plugin Net. Beans IDE Features for Blue. J Users. The Net. Beans IDE provides a wealth of features that make writing applications of all types and sizes faster and easier. These features include the following: Marking of syntax errors in the Source Editor before you compile A variety of navigation commands that enable you to navigate easily between code elements and files A GUI builder in which you visually design the user interfaces for Swing technology- based desktop applications Code templates that allow you to enter long code snippets with just a few keystrokes. The Blue. J plugin for the Net. Beans IDE includes support for the project structures of both the Blue. J and the standard Net. Beans IDE. The coding productivity features work with both project types. Opening and Working on Projects in the Source Editor. Next, unzip the Calculator. In Net. Beans IDE, go to the File menu, and select Open Project. Locate the place you uncompressed the files to, and click Open Project as shown in Figure 2. Figure 2: Opened Project in the IDE If you click on the Project tab, you'll see a set of smaller icons resembling a file structure rather than icons representing objects. If you click the Blue. J View tab, you'll see icons representing the objects. Double- clicking a class icon in either view opens an editor for that class's source code. Open the Calculator. The Net. Beans IDE does not support direct interaction with objects. Instead, to execute a program in the Net. Beans IDE, you must run its main method. Classes with a main method are indicated in the Blue. J Project View by a green arrow, as indicated in Figure 3. Notice that Calculator. It sets the application to show in case the application was closed. The User. Interface class contains all the code for creating the GUI, and the event handler initializes the Calc. Engine class, which contains all the methods for what happens when the user presses the buttons. Open the User. Interface class by double- clicking the file name. As you scroll down, you can see how much code had to be written for this application just to create the GUI. Later, you'll learn a fast way to create a GUI simply by dragging components onto a workspace and letting the IDE write the code for you. Now open the Calc. Engine. java file by double- clicking its name. This class contains the instruction for what happens behind the scenes within the calculator application. When a user presses a button, the event handler looks to this class for the corresponding method, and the Calc. Engine sends the response to the User. Interface class to display the correct response. You still need to write this type of code by hand, but the IDE makes the writing go faster. As you use this IDE, you can save your work simply by clicking on the floppy- disk icons in the tool bar as shown in Figure 5, or go to File and choose Save All. You can add or change the code in the usual manner by typing directly into the Source Editor pane. In addition, the Source Editor has code templates that allow you to enter code snippets using an abbreviation. The Source Editor also lets you hide sections of code through a process called code folding, and it generates code for beans with properties and event sets. The Net. Beans IDE Blue. J plugin contains many other useful features that you'll appreciate as you get to know this IDE. Now you can add or change code as needed. One feature you'll notice right away is the Editor Hints feature. These hints warn you with a lightbulb icon if you are missing a semicolon or an import statement, or if you need to create a variable or a statement. When the lightbulb icon appears, press Alt- Enter to display the hint, or click the lightbulb icon with your mouse. Configuring the Source Editor. You can configure the Source Editor to more closely suit your needs: From the main menu, choose Tools, then select Options. The following three panels include settings for the Source Editor: Editor. Includes settings for code folding, indentation, code templates, and macros. Enables you to fine- tune the fonts, foreground colors, background colors, and other markings for syntax elements, as well as markers such as breakpoints, errors, and bookmarks. Enables you to add, change, or remove keyboard shortcuts for commands throughout the IDE. You can compile individual classes by right- clicking each class's icon and selecting Compile File. Click on the Build menu at the top of the screen, and click on Clean and Build Main Project. Notice that an Output window opens at the bottom of the screen, and the compiler immediately tries to override an old definition, which is an implementation detail of the IDE's project system that you can ignore. It then continues compiling until the build is complete. If there are problems with the build, the output appears in the Output pane. Now click on the Run menu and select Run Main Project to run the Calculator project. If any exceptions are thrown, they appear in the Output window. Otherwise, the calculator should reappear on the screen. Test it out by adding or subtracting some numbers, and the result should look something like Figure 6. Figure 6: Running the Calculator Project Creating New Projects and Using the GUI Builder. In Java platform applications, the components that make up a GUI are stored in containers called forms. The Java programming language provides a set of user interface (UI) components from which you can build GUI forms. The Net. Beans IDE GUI Builder helps you design and build Java forms by providing tools that simplify the process. To see how the GUI Builder works and to get a feel for the various tools and uses, you are now going to create a GUI application. Although you will be creating a Blue. J- style project, you could easily build the same project with a standard IDE such as Net. Beans. For this article, you will create a simple application called Phone. Book that contains fields in which the user can enter a first name, a last name, and a phone number. The application also allows the user to select whether the information is for personal or business use. First, close the Calculator project by going to File and selecting Close . Note: This IDE allows you to have several projects open at a time, but to keep this tutorial simple, close the Calculator project. Click on the File menu and choose New Project. When the next window opens, select Blue. J from the Categories list. In the next window, type Phone. Book in the Project Name field. You can save this project in any location you like by using the Browse button or by typing in a path where you want the files to reside. You are ready to create your first file for this project. Click on the File menu and choose New File. Under Categories, choose Java GUI Forms, then under File Type, click JFrame Form, as shown in Figure 7. Alternatively, you can right- click the project name in the Projects pane, select New, then select JFrame Form. Figure 7: New JFrame Form Click Next and type Phone. Book. Frame in the Class Name field. You can add this class to another package or create a new package, but for this article, leave the default phonebook package. Click Finish. You now have the GUI Builder open and all of its tools available. Your screen should look something like Figure 8. Figure 8: GUI Builder (click image for full size) It's worth taking a tour around the IDE now. Notice the Palette pane on the far right. This pane contains a list of components available for adding to forms. You can customize the Palette window to display its contents as icons only or as icons with component names. Java Tutorialjava.
0 Commentaires
Laisser une réponse. |
AuteurÉcrivez quelque chose à votre sujet. Pas besoin d'être fantaisiste, juste un aperçu. Archives
Septembre 2017
Catégories |