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.
Netbeans' display of DB query results has that nice feature that Microsoft Excel also has: if you double-click on the vertical line separating the column headers, it widens the column to fit the data. Unfortunately, it also incorrectly sorts the results by one of the two columns it straddles. There probably needs to be a "dead zone" around the dividers so this doesn't happen.
Created attachment 134877 [details] proposed patch v1 This problem seems to be fallout from the refactoring I did with regard to ResultSetJXTable and the assoziated models. The SwingX components are more interdependend that I'd wish. The attached patch does two things: 1. Use the build-in TableColumnModelEx of swingx - without this column hiding/selection in the top-right-corner-icon-menu doesn't work (the menu checks the class of the TableColumnModel) 2. The JXTableHeader has special handling for double clicks, that is only invoked, when a TableSortController is present - change BaseClass of StringFallbackRowSorter from TableRowSorter to TableSortController.
Patch applied as http://hg.netbeans.org/core-main/rev/8eb4b90c44f8. Thank you very much, Matthias, for the quick fix.
Integrated into 'main-golden', will be available in build *201305281155* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/8eb4b90c44f8 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #230064: DB query results: double-clicking on vertical line separating column headers also sorts Patch by Matthias42.
yup.