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 227986 - JTextBox lose vertical alignment against components when sized horizontally
Summary: JTextBox lose vertical alignment against components when sized horizontally
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords: 7.4_WAIVER_APPROVED
Depends on:
Blocks:
 
Reported: 2013-03-27 10:15 UTC by MackSix
Modified: 2013-12-19 13:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Logfile (77.63 KB, text/plain)
2013-03-27 10:15 UTC, MackSix
Details
Screenshot 001 (37.90 KB, image/png)
2013-03-27 10:17 UTC, MackSix
Details
Screenshot 002 (40.45 KB, image/png)
2013-03-27 10:17 UTC, MackSix
Details
Project that exhibits the issue. (1.55 MB, application/zip)
2013-03-27 10:20 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2013-03-27 10:15:37 UTC
Created attachment 133120 [details]
Logfile

1. Open attached project in NetBeans and open MyJpanel.java.
2. Size jTextField39 by dragging the right handle over and snap align to the JButton on the right. See attached image.
3. Notice there is no vertical alignment indicator. It stopped working. 
4. Try to slide the jTextField39 over instead of sizing it and it will snap to the button. Leave it in position.
5. Size jTextField40 by dragging the right handle over and snap align to jTextfield39 on the right. It won't work. See image.

None of the JTextField will snap align when re-sized now. They will snap align when moved and they will snap align to the JTextField components above or below when re-sized.

If I recreate this, it works. At some point while positioning the components, vertical alignment stopped working for the JTextField components.

Workaround: use other method of alignment, like Edit Layout Space or align to JTextField components above or below.

This happened with a JLabel on the upper panel too, except vertical alignment indicator stopped working when moving the JLabel to the right and attempting to snap align it to the right side of it's panel. I did not save the project in this state.

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 MackSix 2013-03-27 10:17:03 UTC
Created attachment 133121 [details]
Screenshot 001
Comment 2 MackSix 2013-03-27 10:17:55 UTC
Created attachment 133122 [details]
Screenshot 002
Comment 3 MackSix 2013-03-27 10:20:46 UTC
Created attachment 133123 [details]
Project that exhibits the issue.
Comment 4 markiewb 2013-07-24 17:35:24 UTC
Somehow related to https://netbeans.org/bugzilla/show_bug.cgi?id=231636 ?
Comment 5 Tomas Pavek 2013-08-27 11:46:06 UTC
There are couple of issues around with the dragging feedback, sometimes snapping is not offered on places where it seems it should. It is mostly related to the layout structure more complex than expected by the snap suggestion algorithm. There is usually some workaround possible by rearranging the layout a bit (dragging/resizing something else differently first or rebuilding part of the layout) or using the Align actions (form context menu). Not new in 7.4, this existed always, perhaps not that frequently to run into to be discovered.

I have a couple of example scenarios similar to this one to fix, but this requires bigger changes in the LayoutDragger class which may be risky and requires more time. Not much was fixed in this class in the past (fixes happened more in the area of adding the component to the layout, not before that when just draghging it around), so it would deserve some look. But not suitable for a fix in 7.4 now.
Comment 6 David Strupl 2013-12-19 13:45:08 UTC
Hello, I don't think this qualifies as P2 defect. While I agree that the behaviour can be annoying there is a workaround. As Tomas said if fixing requires bigger changes and he does not feel like having the cycles to do those bigger changes I think we should leave the issue opened but only as a P3 defect.
Br, David