Step 9.7: Add a new class, Prompt


Step 9.7: Add a new class, Prompt

click to expand

q 9.7(a) Make sure the SWT project is selected.

q 9.7(b) Using the Eclipse main menu bar, select New/Class.

click to expand
Figure 9.51: Creating a new class using the main menu bar's New/Class option.

q 9.7(c) Make sure the Source Folder is SWT'.

q 9.7(d) Leave Package blank.

q 9.7(e) Leave Enclosing type unchecked.

q 9.7(f) Enter Prompt in the Name field.

q 9.7(g) Make sure public is checked, abstract and final unchecked.

q 9.7(h) Leave Superclass as java.lang.Object, Interfaces blank.

q 9.7(i) Make sure public static void main(String[] args) is checked.

q 9.7(j) Leave the other two unchecked.

q 9.7(k) Select Finish.

click to expand
Figure 9.52: Setting the fields properly for a new class.

This will create a class Prompt in the default package (because you left package blank) in project SWT, as shown in Figure 9.53.

click to expand
Figure 9.53: The result of the addition of the new class Prompt.



Eclipse
Eclipse: Step by Step (Step-by-Step series)
ISBN: 1583470441
EAN: 2147483647
Year: 2003
Pages: 90
Authors: Joe Pluta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net