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 - Bad repainting when moving component on tabbed panel
Summary: Bad repainting when moving component on tabbed panel
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 154186 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-11 10:08 UTC by Milan Kubec
Modified: 2011-04-22 12:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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