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 71257

Summary: Bad repainting when moving component on tabbed panel
Product: guibuilder Reporter: Milan Kubec <mkubec>
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Milan Kubec 2006-01-11 10:08:55 UTC
[release50-rc1-200601101900, JDK 1.5.0_06]

Steps to reproduce:
1) Create form (JPanel)
2) Add JTabbedPane to it, add JPanel to the tabbed pane
3) Put any component to the panel
When dragging the component over the panel the component is being repainted in
its original location (before dragging started) and it creates strange blinking
efect.
Comment 1 Milan Kubec 2006-01-11 10:52:34 UTC
The efect is visible even more when you are resizing the component.
Comment 2 Jan Stola 2006-01-18 14:39:12 UTC
This is caused by a very strange JTabbedPane behaviour. The tabbed pane
tries to revalidate (e.g. relayout) itself during painting - it revalidates
its content when it is not valid.

The dragged component is still present in its original container, but its
bounds are set to values outside the visual area of the container.
This setting of bounds invalidates the JTabbedPane that in turn
(due to the described behaviour) sets the bounds back.

We will have to implement some workaround for that behaviour
e.g. temporarily set the valid flag of the JTabbedPane to true while
painting the designer.
Comment 3 Jan Stola 2008-12-23 08:49:35 UTC
*** Issue 154186 has been marked as a duplicate of this issue. ***
Comment 4 Jan Stola 2011-04-22 12:00:13 UTC
I have added a hack that makes JTabbedPane valid regularly during dragging of a component.

Modified file: http://hg.netbeans.org/jet-main/rev/86d12dd3fe4e