Try it with a small example. In HelloWorld (Apache web server tutorial)

Try it with a small example. In HelloWorld project, just create a new class named HelloVE as described in Chapter 1 (with a main() method). Then close the Java editor. In the Package Explorer, apply the context function Open with > Visual Editor to HelloVE. Now open the Swing Containers group in the GUI element menu of the VE. Select the component JFrame. Then click the target position in the design area. The smallest possible JFrame instance now appears at the target position. Click the bottom-right corner of this component and drag it to the desired size. As you can see in the Java Beans View, the JFrame instance already contains a content pane (JPanel instance), which fills the entire area of the JFrame instance. Now click the Swing Components group to open it. Select the JLabel component and release the mouse button. Then move the mouse over the (still selected) JFrame component in the design area. As you move the mouse, different areas labeled North, Center, South, East, and West will appear because the content pane is already equipped with a BorderLayout (see below in section Layouts ). Now, click the mouse to place the JLabel component into the Center area. In this area you will now see a JLabel instance named JLabel.It may well be that this instance appears at a slightly different position because the BorderLayout manager performs automatic positioning. Now click the already selected JLabel instance once again. A text input area opens, where you can overwrite the text JLabel with Hello VE, as shown in Figure 3.1. 47 The Art of (Visual) Composition GUI-element menu (expanded) Design area Switch between design and source code Properties-View Beans-View Figure 3.1
Here java web hosting you will find professional-grade java web hosting at affordable prices.

Leave a Reply