This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 64342

Summary: IllegalArgumentException when moving two components outside JFrame's border
Product: guibuilder Reporter: Max Sauer <msauer>
Component: Natural LayoutAssignee: issues@guibuilder <issues>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: Sun   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:
Attachments: exception stack traces

Description Max Sauer 2005-09-14 13:43:03 UTC
When moving two larger components selected at once and exceeding JFrame's
border, following two exceptions may pop up:

java.lang.IllegalArgumentException: An explored context (jScrollPane1
[JScrollPane]) must be within the root context (Form NewJFrame7).
	at org.openide.explorer.ExplorerManager.checkUnderRoot(ExplorerManager.java:488)
	at org.openide.explorer.ExplorerManager.access$300(ExplorerManager.java:52)
	at
org.openide.explorer.ExplorerManager$1SetExploredContextAndSelection.run(ExplorerManager.java:333)
	at org.openide.util.Mutex.readAccess(Mutex.java:261)
...
or

java.lang.IllegalArgumentException: A node selection cannot contain nodes
(jTree3 [JTree]) not underneath the root (Form NewJFrame).
	at org.openide.explorer.ExplorerManager.checkUnderRoot(ExplorerManager.java:488)
	at org.openide.explorer.ExplorerManager.access$300(ExplorerManager.java:52)
	at
org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.checkArgumentIsValid(ExplorerManager.java:194)
	at
org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.run(ExplorerManager.java:246)
...
(stack traces attached)

Steps to reproduce:
---------------------
1) Create a JFrame Form
2) Add two JTrees, align them together (I have also tried two larger JTextPanes)
3) Select both
4) Move them partially or whole outside of JFrame's border
--> exceptions

[200509131800, JDK 1.5.0_05 b03, solaris 10/sparc]
Comment 1 Max Sauer 2005-09-14 13:43:59 UTC
Created attachment 24795 [details]
exception stack traces
Comment 2 Milan Kubec 2005-09-14 16:26:21 UTC
Raising priority, very easily achievable exception and lost layout - those
components are moved to Other Components node (they are not visible in the form).
Comment 3 Jan Stola 2005-09-14 17:22:12 UTC
The components are moved to Other components because they were dropped there.
The exception is harmless, but I am fixing it preferentially because it
has been identified as high priority issue :-/.
Comment 4 Max Sauer 2005-09-15 09:54:08 UTC
The exceptions have been fixed well, thanks. (Verified in 200509141800)
But the behaviour of moving one component differ from behaviur of moving two --
I filed issue 64409 against it (P4).