Java Swing GUI -General Question

Yz388

Limp Gawd
Joined
Feb 18, 2005
Messages
197
ok heres a question for you Java guys. I have been getting a little more in depth with writing GUI for my java apps. I recently googled upon Netbeans, where it reminds me of dreamweaver in the sense of what it can do for GUI.

To clarify, as im sure most of you know, dreamweaver basically asks what you want to do, and puts it into code for you. I noticed netbeans does this for java GUI, and even sets it up for your methods. So for example, you want a box called Convert in a nice little simple gui. You simply draw it out, tell it what you want it to do, (what kind of action), in this case I believe it would be a listener to be called from a method.

So my question is, should I really be using this? Is it as simple as it seems? Jesus, this would save me hours if i can literally draw out my whole gui, and the end result i would just have to call all my methods in my class file. Netbeans even makes it easier to add fancy stuff into it, since you literally tell it you want, say a picture, and it inputs the code for you.


So please, tell me your opinion on this. And if all this is easy, I have been wasting too much time writing the gui code by hand. That would be like writing html by hand, when I simply could open dreamweaver up.


Thanks guys.
 
Well, if its for school, you may not be safe using it, because professors want to see that you know how to implement the listeners / layouts / widgets.

For other things, why not?

As long as it's not going to mess up some design / code spec you have to follow.

Swing can get really unwieldy and complex. Especially if you try to outsmart it :)
 
So theres the hunch huh. It adds a ton of extra code, but in return, it makes writing GUI much easier? Off the top of your head, what else can you do with it? If i get a chance this weekend, saturday night, ill play around with it. Seem if i can fancy up some old programs I have written. (If the girlfriend lets me stay in for the night ;) )

As for the school thing, this is my 3rd Java class which is more data structure's than anything. My lovely professor made it clear that it is ok using apps like this, because it is not helping us learn the data structure side of things any easier. This really would just make GUI much easier, and if anything, more visually appealing for her when she looks at it.


Any other tips regarding Netbeans would be mint.


Thanks guys



After rereading the posts, you would think professors, say in intro java courses would allow this. I mean as for as the action listeners, you still basically need to link them to your methods and whatnot, and personally, that is what I find most difficult. I guess you should have a basic understanding how to write them I suppose. Oh well, I learned the hard way. This should make things much easier, and hopefully make java a bit more enjoyable.

(I also noticed I code easier when I have a gui pre done, helps me visualize what methods need to be done, and i dont know. Just helps.)
 
the only thing that pisses me off in Netbeans is the blocks of code automatically written code that it wont let you change. Thats annoying. But other than that, I really liked Netbeans because of how simple it is to make GUIs and that is how I started learning how to do them too.
 
a gui for making guis is fine to get something schlepped together quickly when you "just need it to work", as in your case. for more complicated applications, it can sometimes be helpful to do it manually as you have complete and explicit control of everything.
 
Just curious. In the professional world, would you be using GUI designers such as this, or would you be doing everything by hand?
 
the netbeans gui designer is really nice, but the code it generates is unreadable an unmaintainable. Its also pretty easy to get it into a state where netbeans cant edit the gui anymore.

I've been playing with swixml.org recently, which is a pretty cool way to define your gui's in xml. Now if netbeans output the gui layout into xml like that instead of generated code, it would be great.
 
Just curious. In the professional world, would you be using GUI designers such as this, or would you be doing everything by hand?
It depends on the designer. Successful professional-level tools have enough capacity to do what you need, then have a very clean break where you can influence the outcome by adding or changing things, then avoiding being overwritten by further edits to the UI with the tool.
 
Back
Top