Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 153653 - Form editor grid size missing in preferences
Form editor grid size missing in preferences
Product: guibuilder
Classification: Unclassified
Component: Code
All All
: P1 (vote)
: 7.1
Assigned To: Jan Stola
: 156742 158935 194348 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2008-11-21 15:31 UTC by mceccarellitnx
Modified: 2011-12-10 10:02 UTC (History)
5 users (show)

See Also:

fix for 153653 (18.20 KB, patch)
2011-10-23 14:49 UTC, remould
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mceccarellitnx 2008-11-21 15:31:57 UTC
In older Netbeans there was an option in Advanced GUI to set Grid X and Grid Y size (default to 10, i set to 5).
There's no way in Netbeans 6.5 to set this option
Comment 1 Jiri Vagner 2008-12-11 12:40:58 UTC
Thank you for your report. These options were removed during (Advanced) Options cleanup.

Workaround: You can override default size of these properties manually using file. Copy attached sample file into <your-nb-userdir>\config\Preferences\org\netbeans\modules\ folder or merge gridX a gridY
settings into existing file and (re)start ide.
Comment 2 Jiri Vagner 2009-01-14 10:16:47 UTC
*** Issue 156742 has been marked as a duplicate of this issue. ***
Comment 3 freemind 2010-01-19 22:49:26 UTC
I think that grid size should be added to preferences in netbeans. Grid size permanently set to 10 can significantly lower productivity in many cases. I know now, that it can be changed in "" file, but many users dont know about it. It should be in preferences, where anybody can change it easily.
Comment 4 Tomas Pavek 2011-02-01 10:43:36 UTC
*** Bug 194348 has been marked as a duplicate of this bug. ***
Comment 5 Tomas Pavek 2011-02-01 14:33:41 UTC
*** Bug 158935 has been marked as a duplicate of this bug. ***
Comment 6 Jiri Kovalsky 2011-02-07 12:56:28 UTC
Issue added to the NetFIX Pool [1] for community developers. Hint: see Editor's panel in Options and re-introduce missing properties.

Comment 7 Tomas Pavek 2011-02-17 14:35:32 UTC
It's not Editor, but GUI Builder panel under Misc category in Options. In the 'form' project there is still the FormLoaderSettings class with getter/setter methods for these missing properties. It's just a matter of adding the UI.
Comment 8 Tomas Pavek 2011-02-18 14:48:43 UTC
My last comment was for a generous developer who would like to contribute a fix.

For users, the workaround is to edit a conf. file. Here are steps:
* Go to Tools | Options > Misc > GUI Builder and change whatever setting (e.g. Listener Generation Style to One Inner Class).
* This will create a config file: $userdir$/config/Preference/org/netbeans/modules/
  See Help | About where your userdir is.
* Exit the IDE, open the file and add/change any property for the grid. You can use:
Comment 9 mceccarellitnx 2011-05-10 13:56:41 UTC
in NetBeans IDE 7.0 (Build 201104080000) is not working anymore to add gridY and gridX in, grid size remain to default size (that seem 10 and it is too big)
Comment 10 remould 2011-10-05 14:40:44 UTC
I'd like to NetFIX [1] this bug. Is it possible? [1]
Comment 11 Jan Stola 2011-10-06 07:52:23 UTC
(In reply to comment #9)
> in NetBeans IDE 7.0 (Build 201104080000) is not working anymore to add gridY
> and gridX in, grid size remain to default size (that seem 10
> and it is too big)

Could you be more specific, please. What exactly do you have in that is not working. I tried to modify gridX and gridY in NB 7.0 and NB 7.0.1 and the modified values were used by GUI Builder correctly.

(In reply to comment #10)
> I'd like to NetFIX [1] this bug. Is it possible?
> [1]

Yes, feel free to contribute a patch fixing this issue, but note that UI change is necessary to fix this bug. Hence, it is too late for the fix to make it into NetBeans 7.1.
Comment 12 remould 2011-10-06 11:54:44 UTC
I will add two fields in the ui for gridX and gridY. One thing I need to know is - what default value should I use for this two properties? Should I use 10 as before or something lower than that?
Comment 13 Jiri Kovalsky 2011-10-06 12:08:07 UTC
In my opinion it's better to preserve the previous default values.
Comment 14 remould 2011-10-23 14:49:12 UTC
Patch attached. I have done some changes to the form module in this patch. Added a ui component to change the grid x grid y in the options panel in the GUI Builder tab. Only a single field has been added to change both grid x and grid y. Is this ok? Because to my understanding it does not make sense that anyone will want to have different values for grid x and grid y.
Comment 15 remould 2011-10-23 14:49:23 UTC
Created attachment 112346 [details]
fix for 153653
Comment 16 Jiri Kovalsky 2011-10-24 09:07:21 UTC
Honzo, can you please review this patch and integrate it if you think it's good to go? Thanks!
Comment 17 Jan Stola 2011-10-25 19:29:20 UTC
Thank you for the patch. It looks good. I have integrated it. So, it will soon appear in the latest development builds and later in NetBeans 7.1:

> Only a single field has been added to change both grid x and grid y.
> Is this ok?

I agree with a single field present in Options, but I modified your patch slightly to keep the original persistence (with both gridX and gridY properties stored). This change provides a backward compatibility and also allows to have gridX and gridY values different (if someone really needs this) when file is edited directly.
Comment 18 Jiri Kovalsky 2011-10-25 20:14:29 UTC
Thanks Honzo for your review and integration but especially thanks Milinda for your patch!
Comment 19 MackSix 2011-11-20 14:19:47 UTC
Why does this not go down to 1?
Comment 20 remould 2011-12-10 10:02:11 UTC
That is because the underlying persistent model does not allow a value below than 2. Hence the jspinner has been constructed with a minimum value of 2.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo