Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Netbeans?

 
Mike Lipay
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone here use NetBeans to develop? If so, I have a question.

I just picked this up and I'm trying to use it to create a Java Desktop Application (NB seems a bit confusing at this time), how/where do you set the window title? I creates the window with the title "Basic Application Example", but I can't find that text in any of the code it's generating.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More related to Netbeans.
Moving.
 
K. Tsang
Bartender
Posts: 3347
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The title is not changed in the source but in the "resources" section. Using default project name the properties file is "DesktopApplication1.properties" then look for Title.

However, if you are learning Swing, I don't recommend using the Netbean's desktop application generator. You may want to look at the Java Tutorial.
 
Mike Lipay
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:The title is not changed in the source but in the "resources" section. Using default project name the properties file is "DesktopApplication1.properties" then look for Title.

However, if you are learning Swing, I don't recommend using the Netbean's desktop application generator. You may want to look at the Java Tutorial.


I thought it a neat way to organize the development with different classes and windows, but it seemed more awkward than anything. For example, it creates menu and progress bars, which don't really fit with my application. When I deleted them from design mode only the actual fields were deleted, all of the logic behind them remained, when I compiled I received over 40 errors.
 
K. Tsang
Bartender
Posts: 3347
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is why doing GUI programming with design mode isn't good. Check out Swing tutorial to do GUI with source.
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:This is why doing GUI programming with design mode isn't good. Check out Swing tutorial to do GUI with source.
That is completely untrue. In GUI programming tools must be used. I don't want to spent my life to refactor a gridbaglayout when inserting a new control. In the company I work a smarty guy took the decision to use Eclipse SWT without GUI tools. I spent a day to modify a dialog box because of layouts.
If the Netbeans model of GUI code generation is the best model or not, that's arguable. But not using tools at all for GUI design is wasting time.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aurelian Tutuianu wrote:
K. Tsang wrote:This is why doing GUI programming with design mode isn't good. Check out Swing tutorial to do GUI with source.
That is completely untrue. In GUI programming tools must be used. I don't want to spent my life to refactor a gridbaglayout when inserting a new control. In the company I work a smarty guy took the decision to use Eclipse SWT without GUI tools. I spent a day to modify a dialog box because of layouts.
If the Netbeans model of GUI code generation is the best model or not, that's arguable. But not using tools at all for GUI design is wasting time.


This is all debatable, and many can marshal good arguments for both sides. Myself, I find that when newbies to Swing use NetBeans to generate their code, it seems to actually inhibit their learning of Swing, as if shielding them from the details also inhibits their curiosity thereby slowing down their learning. My own opinion (FWIW), is that NetBeans is an OK tool if you already are pretty well versed in Swing, but it should not be used by beginners if they are desiring to learn Swing.

Let the flames come...
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pete stein wrote:This is all debatable, and many can marshal good arguments for both sides. Myself, I find that when newbies to Swing use NetBeans to generate their code, it seems to actually inhibit their learning of Swing, as if shielding them from the details also inhibits their curiosity thereby slowing down their learning. My own opinion (FWIW), is that NetBeans is an OK tool if you already are pretty well versed in Swing, but it should not be used by beginners if they are desiring to learn Swing.
Let the flames come...
I did not state that is good for Mike to learn from tutorials. I argued only against the statement that "GUI programming with design mode isn't good". Which still I believe is wrong. Still, Netbeans, for the ones who try to learn swing is a good starting point because you learn from creators how they do things. If you really want to learn.
 
Mike Lipay
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have a big problem with NB, just seems that if you delete an object (such as the progress bar) that it should delete everything connected to it, not just the object itself.
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your particular case, the deleting of progressBar is not removed from all references just because the wizard don't manage the content of contructor. That form is a template, somethings meant to learn from. I don't say that wouldn't be nice to remove references from code.
 
K. Tsang
Bartender
Posts: 3347
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aurelian Tutuianu wrote:In your particular case, the deleting of progressBar is not removed from all references just because the wizard don't manage the content of contructor. That form is a template, somethings meant to learn from. I don't say that wouldn't be nice to remove references from code.


Then this is like learning how to use NB effectively rather than Java.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aurelian Tutuianu wrote:Still, Netbeans, for the ones who try to learn swing is a good starting point because you learn from creators how they do things. If you really want to learn.

Have you seen the code NetBeans generates? Do you seriously believe anyone can learn Swing from that? This is not a "learn from the creators" type of situation but rather a "learn from extremely obtuse code generated by a computer that can be read only by a computer". Expecting to learn Swing from NetBeans generated code this is like ordering a Big Mac from McDonalds and thereby expecting to learn how to cook.
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a matter of fact a started to learn swing from what NetBeans generated. Perhaps I am an obtuse computer too, never know.
I generated a form just to see what it produces:
Can you explain again where the extreme obtuse words are hidden? What did you not understood from such generated code?
Again, I don't state that for a beginner is not better to build manually his swing controls. I said only that GUI generated tols are not bad. They are very productive if you separate very well your UI from model. Don't have to be a genius to understand that.
And pointed out that in the first times the generated code was a starting point. And that's true. And that's all. I will not argue anymore on that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic