| # | Test case | Description |
| 1 | Create a JFrame Form |
- Select MyApplication/Source Packages/myapplication in the Project view
- Choose from popup New | File/Folder...
- Choose Java GUI Forms > JFrame Form and press Next> button.
- In New Wizard type name "MyJFrame"
- Push Finish button
- Select MyApplication node in the Project view again
- Invoke Properties from node popup menu
- Select Libraries node in the Categories pane
|
|
| RESULT: | NO library should be present in the Compile tab, Compile-time libraries! |
|
| 2 | Change Project Main Class |
- Select MyApplication/Source Packages/myapplication in the Project view
- Invoke Properties from node popup menu
- Select Run node in the Categories pane
- Change Main Class field to myapplication.MyJFrame
- Confirm Project properties dialog
- Select MyApplication node in the Project view
- Invoke Clean and Build Main Project action from toolbar
|
|
| RESULT: |
Check if two lines, similar like following, is appeared in the Output window
To run this application from the command line without Ant, try:
java -jar /<some path>/MyApplication/dist/MMyApplication.jar
|
|
| 3 | Library presence |
- Switch in the Files view
- Expand MyApplication/dist in the Files view
|
|
| RESULT: |
There is neither lib directory nor swing-layout-1.0.jar file in the dist directory
|
|
| 4 | Run Project Outside IDE |
- Select MyApplication node in the Project view
- Invoke Clean and Build Main Project action from toolbar
-
Copy similar line from Output window to clipboard
java -jar /<some path>/MyApplication/dist/MMyApplication.jar
- Exit IDE
-
In the command line place the line from clipboard and enter (the same java version 1.6.0 is expected on the path, classpath)
|
| Teardown: | Restart IDE with the same userdir as previous |
|
|
| RESULT: |
The MyApplication should be started from command line. (The same version of JDK is expected, path, classpath)
|
|
| 5 | Add New Java Platform |
- Invoke Tools | Java Platform Manager from Main Menu
- Push Add Platform button and select jdk1.5.0 folder
- Close Java Platform Manager dialog
|
|
| RESULT: | New JDK1.5.0 Java Platform should be appeared in Java Platform Manager |
|
| 6 | Change Project Platform |
- Select MyApplication node in the Project view
- Invoke Properties from node popup menu
- Select Libraries node
-
Change Java platform field to JDK 1.5.0, confirm Change Java Platform dialog and close Project Properties dialog.
- Invoke Clean and Build Main Project action from toolbar
|
|
| RESULT: |
Project should not be compilable due to library missing and wrong packaging of Group layout (jdk1.6.0)
|
|
| 7 | Code Generation I. |
-
Select MyApplication/Source Packages/myapplication/MyJFrame node in the Project view
- Invoke Open action from popup menu
- Switch Form Editor to Source view by pushing Source button in the editor toolbar
- Expand all guarded block's folds
-
Check that you see javax.swing.GroupLayout snippet in the generated code (should be error, red annotated)
- Switch Form Editor to Design view by pushing Design button in the editor toolbar
- Select Form MyJFrame node in the component Inspector
-
Change Layout Generation property to Swing Layout Extension Library in the Properties window
|
|
| RESULT: |
Switch Form Editor to Source view by pushing Source button in the editor toolbar
Check that snippet javax.swing.GroupLayout is changed to org.jdesktop.layout.GroupLayout (should be error, red annotated - swing extension library is still missing)
|
|
| 8 | Add Swing Extension Library |
- Select MyApplication node in the Project view
- Invoke Project Properties dialog from popup menu
- Select Libraries node in the Categories
- Push Add Library button
-
Select Swing Layout Extensions in the Add Library dialog and push Add Library button
- Confirm Project properties dialog, push OK button
- Invoke Clean and Build Main Project action from toolbar
|
|
| RESULT: |
Project should be compilable and when you switch to Source view of Form Editor, error, red annotation is disappeared
|
|
| 9 | Code Generation II. |
- Select MyApplication node in the Project view
- Invoke Properties from node popup menu
- Select Libraries node
-
Change Java platform field to JDK 1.6.0, confirm Change Java Platform dialog and close Project Properties dialog.
- Remove Swing Layout Extensions library from Compile-time libraries
- Invoke Clean and Build Main Project action from toolbar
-
Project should NOT be compilable, because form code generation is still using Swing Layout Extesions library
-
Select MyApplication/Source Packages/myapplication/MyJFrame node in the Project view
- Invoke Open action from popup menu
- Switch Form Editor to Design view by pushing Design button in the editor toolbar
- Select Form MyJFrame node in the component Inspector
-
Change Layout Generation property to Standard Java 6 Code in the Properties window
- Invoke Clean and Build Main Project action from toolbar
|
|
| RESULT: |
Switch Form Editor to Source view by pushing Source button in the editor toolbar
Check that snippet org.jdesktop.layout.GroupLayout is changed to javax.swing.GroupLayout
Project should be compilable
|
|
|
In the previous cases we switch jdk platform from 1.6.0 (default, IDE running) to 1.5.0. Now, we perform an opposite change (1.5.0 -> 1.6.0)
|
|