Is it okay if I start building swing apps using the NetBeans GUI builder?

I learned the basics of swing and the basics of event handling from head first java ... Then I read some tutorials on developing swing applications using netbeans ...

and I liked it, because I do not need to take care of the layouts and materials ...

But I read on one of the forums that I should learn to swing correctly, and not directly use netbeans ...

It confused me a little.

Please suggest the best way to master swing application development ....

early

+4
source share
4 answers

Well, I see that I will confront the majority here; -)

Manual coding is a pain in the ass. Everything that makes the task easier is a good thing in my book. When you are just starting out, creating a generated GUI allows you to get up and work faster.

GUI constructors handle really repetitive work and prevent you from doing the most common dumb things. The downside is the same approach, which will also stop you from doing really smart things. In the end, you will come across something that you cannot do with the GUI constructor, and you will need to pop the code. Thus, you cannot treat code generators such as black boxes where you do not need to know what is going on inside. At a minimum, you need white boxes. Let the GUI developer do his magic, but understand this magic and its limitations.

Practice creating a very simple graphical interface. Go through the code and understand what it does. Make changes to the constructor and see how the generated code changes. Try changing the code yourself to confirm that you understood correctly. *

If you don’t understand something, click on JavaDocs, Swing Trail or browse the Java2S Swing Tutorials .

If you're still stuck, try the good people at Java Ranch , or here at /fooobar.com / ....

* Netbeans places the generated code in protected blocks and will not allow you to edit them directly. However, you can open the file in another editor to test the change. In addition, you can do a lot to influence code generation using the code tab in the properties window.

+4
source

It depends on what you see as your goal. There is no β€œideal” approach to use Java and swings conveniently, it always depends on how you want the result to be like that.

Most enterprises depend on stability and speed; programmers must write code quickly and stably. If you write complex interfaces manually, it becomes ugly when it comes to speed and accuracy at the same time. You can never write better code in terms of β€œit works,” then a netbeans builder can be created. In addition, no one will see your code after starting the application.

If you want to get to know the swing only to find out without any deeper intentions, however that may be, I would recommend learning by heart without netbeans, as you are likely to get to know most of the functions better on the contrary.

On the one hand, if I want to learn something, I want to learn it from scratch, so I will probably write the swing code myself and, in the end, using netbeans to create it, when I can fully understand that generated. On the other hand, if I need to write applications quickly and not pay for any details, I just use netbeans.

0
source

I think you yourself answered ... you want to master the development of swing-applications ... everything that you do, auto-generating, not knowing why and how they do not master in my opinion;)

0
source

If you want to become a master, you should at least know how to do it with your bare hands. Moreover, it will also help you if you use other gui tools (the basic principles of gui sets are more or less the same, imho).

0
source

All Articles