Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361100 - Error Creating a Jpanel trying to draw it directly on the container with mouse
Summary: Error Creating a Jpanel trying to draw it directly on the container with mouse
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: WindowBuilder (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Alexander Mitin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-17 04:21 EDT by Alessio Pollero CLA
Modified: 2021-06-04 16:45 EDT (History)
2 users (show)

See Also:


Attachments
WindowBuilder log report (139.01 KB, application/octet-stream)
2011-10-17 04:22 EDT, Alessio Pollero CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessio Pollero CLA 2011-10-17 04:21:07 EDT
Build Identifier: M20110909-1335

Using GroupLayout and trying to draw directly a component in the desired area, WindowBuilderPro generates the error which detail in the attachment.



Reproducible: Always

Steps to Reproduce:
1. Click on JPanel component on the Palette
2. Move the mouse to an area of the frame where you want to place the component
3. Click on the area and without release the mouse button draw a rectangle
Comment 1 Alessio Pollero CLA 2011-10-17 04:22:08 EDT
Created attachment 205301 [details]
WindowBuilder log report

This is the generated bug report of WindowBuilderPro.
Comment 2 Eric Clayberg CLA 2011-10-17 11:08:02 EDT
!MESSAGE Designer [1.1.0.r37x201109091012.201110171007]: javax.swing.JTabbedPane[,0,0,0x0,invalid,layout=javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=201326944,maximumSize=,minimumSize=,preferredSize=,haveRegistered=false,tabPlacement=TOP] is not attached to a horizontal group
!STACK 0
java.lang.IllegalStateException: javax.swing.JTabbedPane[,0,0,0x0,invalid,layout=javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=201326944,maximumSize=,minimumSize=,preferredSize=,haveRegistered=false,tabPlacement=TOP] is not attached to a horizontal group
	at javax.swing.GroupLayout.checkComponents(Unknown Source)
	at javax.swing.GroupLayout.prepare(Unknown Source)
	at javax.swing.GroupLayout.layoutContainer(Unknown Source)
	at java.awt.Container.layout(Unknown Source)
	at java.awt.Container.doLayout(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validateTree(Unknown Source)
	at java.awt.Container.validate(Unknown Source)
	at org.eclipse.wb.internal.swing.model.component.top.WindowTopBoundsSupport.apply(WindowTopBoundsSupport.java:67)
	at org.eclipse.wb.core.model.AbstractComponentInfo.refresh_afterCreate(AbstractComponentInfo.java:241)
	at org.eclipse.wb.core.model.ObjectInfo.refreshCreate0(ObjectInfo.java:552)
	at org.eclipse.wb.core.model.ObjectInfo.access$0(ObjectInfo.java:546)
	at org.eclipse.wb.core.model.ObjectInfo$5$1.run(ObjectInfo.java:486)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:139)
	at org.eclipse.wb.core.model.ObjectInfo$5.run(ObjectInfo.java:484)
	at org.eclipse.wb.internal.swing.utils.SwingUtils$2.run(SwingUtils.java:76)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Comment 3 Konstantin Scheglov CLA 2011-11-14 16:22:18 EST
This line is invalid:
addComponent(panel, GroupLayout.PREFERRED_SIZE, -41, GroupLayout.PREFERRED_SIZE)
Preferred size can not be negative, so GroupLayout fails to create groups and WB can not parse it too.
Put some positive value here.