• Post Reply Bookmark Topic Watch Topic
  • New Topic

NetBeans use for GUI's  RSS feed

 
Dale Webb
Greenhorn
Posts: 7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, brand new to this site. Recently in class we started with NetBeans and making simple GUI's. Talking to a few people online and some other programmers I know,
tell me it is a very redundant thing to learn how to use NetBeans as there are a lot of unfixable bugs when trying to implement it in real world apps.

Just looking for an opinion, and if what I have been told is true, what other IDE's could I use for GUI development?
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is just my opinion, but using IDEs that build GUIs via code are almost universally bad. They never seem to produce readable code (and have a tendency to create 'untouchable' files which if you modify get written right back to the way they were - perhaps breaking code.) For Swing and SWT in Java I don't think there is a good solution except making the GUIs by hand.

The exception is when the GUIs are inflated from XML based files, like Android and .NET's WPF. In these cases, the XML structure lends itself to both machine construction and the way UIs work, and visual building tools do a great job.

I don't know anything about JavaFX so I don't know how it is built or the quality of tools for creating them...
 
Campbell Ritchie
Marshal
Posts: 56562
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

SL might say that is only his opinion, but that opinion is correct
 
Piet Souris
Master Rancher
Posts: 2044
75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no, it's not.

indeed, the code produced is incomprehensible, but that is not the fault of the IDE.
Look at the Oracle tutorial about LayoutManagers and look at the example they give
in the section of GroupLayout. There they're doing it "by hand" and it is just as unreadable.

If I have to use a GUI builder, because my layout it too complex to do it by hand,
then I simply do not look at the code, which is hidden anyway. And when printing it out,
I first drop the code into a text editor and then delete all that gui code; saves a couple
of pages.

I just read about MigLayout, looked very promising to me, sort of ideal combination of
a gui builder and doing it by hand.
 
Campbell Ritchie
Marshal
Posts: 56562
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have never used Mig, but have only heard good things about it.
 
Dale Webb
Greenhorn
Posts: 7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am so surprised to see I actually got valid answers to my question. Thanks all. I see where both sides are coming from. I do believe knowing the code and being able to reproduce it by hand is much better than just throwing it together a GUI in an NetBeans. It's hard when my lecturer tells me that in a real world environment, I will just be copy and pasting the code and using NetBeans. Then when talking to people who do work in the business say that I would never use it. So for now, I think I will do my best to learn as much of it as i can. Thank you for your opinions, much obliged.
 
Campbell Ritchie
Marshal
Posts: 56562
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dale Webb wrote: . . . I see where both sides are coming from. . . .
That is something valuable. You can see where Piet Souris disagreed with Steve Luke and myself. SL and I don't like getting beginners to use IDEs, because the learning curve is too steep and PS points out that the group layout code is illegible whether you use an IDE or not. Those problems are actually similar: do you use automated tools or do you understand the code?
 
Dale Webb
Greenhorn
Posts: 7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do understand the code very well, I just can't seem to get it to stick in my head, so I can just reproduce it when needed.
 
Robert D. Smith
Ranch Hand
Posts: 221
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dale Webb wrote:I do understand the code very well, I just can't seem to get it to stick in my head, so I can just reproduce it when needed.

I can relate to this. Back in the day I was writing COBOL code -- never needed to use a goto, but I had to get the manual out to check the syntax to open a file. I must admit that I sort of miss Microsloth's Visual Basic IDE. UI's were nice to design and layout, code completion, syntax error highlighting and the debug window was really good. I've been using Eclipse for my code writing -- simply because Notepad++ hasn't been ported to Linux, and I never did like emacs (great editor, just not for me). I also find myself writing out the code for the GUI because it gives me more control over the look and feel. Very easy to set up UI rules and standards.
 
Dale Webb
Greenhorn
Posts: 7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you say the best way to get it all to stick is just to constantly code it out?
 
Robert D. Smith
Ranch Hand
Posts: 221
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dale Webb wrote:Would you say the best way to get it all to stick is just to constantly code it out?

I'd say it varies by the individual, although I'm sure someone is out there shilling some book or product to improve memory recall. I spent an hour the other day trying to find the bug in

int Len = String.length();

Drove me nuts until I realised my mistake. You will find people that can quote verse and chapter of a languages syntax, who couldn't write a line of code. And you will find people that can code, but trip over simple syntax. Inevitably, like most things, the more code you write the better you (should) become.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well said Robert (have a cow). There really isn't a trick, it is just practice.
 
Dale Webb
Greenhorn
Posts: 7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all so much for your replies and taking the time to help me out Code, code and more code for me then. Thanks again all.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!