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 101169

Summary: Center horizontally issue
Product: guibuilder Reporter: Jiri Vagner <jvagner>
Component: CodeAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: before-center.png
after-center.png
center-01.png
center-02.png
center-03.png
center-04.png
center-05.png

Description Jiri Vagner 2007-04-16 15:33:34 UTC
After using "Center horizontally" icon, jpanel is resized in a strange way. The
goal is to have a middle button centered between left and right button. 

Steps to reproduce ...
 - create jframe and add jpanel and three jbuttons (before-center.png)
 - choose jButoon3 and jPanel1 and press "Center horizontally" icon
 - jpanel is resized now and it's very hard to setup original width of jpanel
(after-center.png)

"Workaround" ...
 - create jFrame with one button (center-01.png)
 - choose jButoon1 and jPanel1 and press "Center horizontally" icon (center-02.png)
 - add jButton2 beneath left bottom corner of jPanel1 (jButton1 is not centered
after adding jButton2) (center-02.png)
 - add jButton3 beneath right bottom corner of jPanel1 (center-04.png)
 - move jButton1 horizontally and "catch" dashed vertical center line
(center-05.png)
Comment 1 Jiri Vagner 2007-04-16 15:39:41 UTC
Created attachment 40972 [details]
before-center.png
Comment 2 Jiri Vagner 2007-04-16 15:40:41 UTC
Created attachment 40973 [details]
after-center.png
Comment 3 Jiri Vagner 2007-04-16 15:42:59 UTC
Created attachment 40974 [details]
center-01.png
Comment 4 Jiri Vagner 2007-04-16 15:45:47 UTC
Created attachment 40975 [details]
center-02.png
Comment 5 Jiri Vagner 2007-04-16 15:46:27 UTC
Created attachment 40976 [details]
center-03.png
Comment 6 Jiri Vagner 2007-04-16 15:48:19 UTC
Created attachment 40977 [details]
center-04.png
Comment 7 Jiri Vagner 2007-04-16 15:49:56 UTC
Created attachment 40978 [details]
center-05.png
Comment 8 Tomas Pavek 2010-08-25 12:13:13 UTC
The centering feature can align selected components on common center axis, but is not able to center a component within given space (e.g. between other components). That is a missing feature.