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.
In the generator that generates a class extending JPanel I have a suggestion I prefere the code public static void main(String args[]) { TestPanel test=new TestPanel(); test.show(); } rather than public static void main(String args[]) { new TestPanel().show(); } Basically the oneline solution is much nicer than my two line solution. But what if I want to add a statement before test.show(); I might want to initialize some data !!!! This makes me think that it is better to generate the "two" line code than the oneline compact code. My situation is that I have made some prototyping in Swing using NetBeans ... very nice way of working. But I always needs to replace the oneline code by a several line version. Therefore I suggest that the codegenerator is changed to produce less compact code. best regards Anders
Sources are generated from Templates. You can find them if you go to "Filesystems" node in Explorer and invoke Customize action. Than find Defult filesystem and set Hide to false on it. Now you can see many folders and one of them is Templates. In the Templates you can find your classes (JFrame, JPanle etc.). You can change them and try to invoke action New from template on your package. You will see your change in new generated classes.
My mistake. I set it as Fixed but I better set it as Invalid. Because you can customize behaviour of IDE by your way and Templates I think will not be changed.
You can reopen it if you think that Templates chould be changed.
Hi Anders, you can customize the templates by going into: Tools/Options and here: Source Creation and Managment/Templates. Here you can choose the template, and choose "Edit" from the context menu. On the other hand, I think it is valid to propose changes to default settings of the IDE (note: this does not mean that I think it has to be applied, I only think it should be analysed). I am reopening the issue, and asking for evaluation.
I have no strong opinion about this. It could be done the way Anders suggest...