Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Java Question

FortKnox (169099) writes | more than 11 years ago

Java 21

This is interesting. I'm usually answering the java questions, but today I ask one.
I'm writing my first SWING app. My java experience is J2EE webapps, no swing experience.
In fact, I haven't done much of any windows app...This is interesting. I'm usually answering the java questions, but today I ask one.
I'm writing my first SWING app. My java experience is J2EE webapps, no swing experience.
In fact, I haven't done much of any windows app...

Anyhow, I'm looking for a good IDE to create an app. I tried JBuilder8 (personal), and the designer is very difficult to understand, and I can't seem to get my mellon around how it works. I'd prefer something VB-ish. I'll draw out the app, and plug the code into the events.

Any ideas/help out there?

cancel ×

21 comments

Sorry! There are no comments related to the filter you selected.

That's a problem, all right (2, Informative)

cyranoVR (518628) | more than 11 years ago | (#5698840)

The thing is, Sun is still working on it [eweek.com] .

You might want to check out the SunONE studio (formerly Forte for Java) Community Edition (free download) which is itself based on NetBeans.

Re:That's a problem, all right (1)

dthable (163749) | more than 11 years ago | (#5698910)

I've tried Forte at every major revision since 1.0, but I never got the hang of how it was composing the forms to develop an application. It was also too busy with the different tab workspaces. JBuilder, IMHO, was more intutive.

Re:That's a problem, all right (1)

cyranoVR (518628) | more than 11 years ago | (#5700728)

You know you're right.

I haven't used Forte enough so maybe I shouldn't have mentioned it. Oh well.

never done an IDE... (1)

jeffy124 (453342) | more than 11 years ago | (#5698841)

I've never used an IDE for my GUI development - always have gone straight to the code. Then again, my GUIs have never been too terribly complex, so coding manually would be easy. Yours, if complex enough, may be easier to go through an IDE.

If you need a good place to start - the Java Tutorial on Sun's website is a good starting point, as is just about any book on Swing. There may have even been a few reviewed on slashdot.

Re:never done an IDE... (1)

John Harrison (223649) | more than 11 years ago | (#5700317)

I have always done the opposite.

I use an IDE to put together demos and simple GUIs and I do the complicated ones by hand. That way I have greater control over their behavior. A simple GUI isn't worth the effort of coding by hand though. I have done a lot of both and found that complex GUIs require you to get your hands dirty almost every time.

VAJ (2, Informative)

John Harrison (223649) | more than 11 years ago | (#5698849)

Use VisualAge for Java. I think that you can still download an evaluation copy for free. It is my favorite development environment ever. It is great for quickly throwing together a Swing based gui. If you need something fancier you might want to do some coding by had, but for most of my needs the gui builder has been more than adequate. You just grab components off the palette and put them on the window. It takes a little while to get used to the way the code for classes is displayed in the editor, but now I think it is superior.

Of course I am biased since I work for IBM. :) Then again, IBM is sort of getting rid of it in favor of the Eclipse based tools. Too bad...

http://www7b.software.ibm.com/wsdd/zones/vajava/ [ibm.com]

Re:VAJ (2, Informative)

jawtheshark (198669) | more than 11 years ago | (#5699824)

No way! Visual Age is a fine IDE (I love the Repositories and the version management), but really, as a code generation for GUI building it absolutely sucks. I've used tons and tons of different IDE's, and the only thing I can say is: they all suck for GUI building (with JBuilder sucking the least).
I reverted back to the good old times coding my GUI by hand. It's the only good way to learn what is actually happening. You won't understand a GridBagLayout by drag 'n dropping components. Anyways for a good IDE go for Eclipse (or if you've got the dough: for Websphere Studio Application Developper), which rocks absolutely.... Well, given a PC with lots of memory and speed. (At work it's some high end P-IV with 1Gig RAM, no problem whatsoever. My personal PC eats WSAD for breakfast)

On the Mac, the free Project Builder that Apple provides is just fine. It doesn't do code completion, which sucks, but then code completion is for lazy people right? (I use code completion all the time in Eclipse and WSAD, but I can live without it)

Re:VAJ (2, Interesting)

John Harrison (223649) | more than 11 years ago | (#5700257)

Um, please tell me how it sucks at code generation. I find the code that it generates to be clean and readable. Even when I first started using it I never looked at the code and thought, "Crap, what does that do?" It was plain from the beginning. If you want to use a fancy layout that adjusts nicely when resized I agree that you should code it by hand. I think I stated that in my original post. That is certainly what I do. If you don't need that as a feature then I don't see what is wrong with VAJ. Also, if you want to put something simple together without having to learn about the Swing layouts (which I think is the situation here) the what is the harm in using VAJ?

I tried pasting some generated code to ask what is bad about it but it ran up against the lameness filter, but I don't think that means /. was passing judgement on the generated code. :)

I agree that the version control system is great. It does take some time to get used to the nuances of it though. At one of my engagements I taught a short class on "Understanding VAJ Version Control" since so many of the users didn't get it.

Re:VAJ (1)

jawtheshark (198669) | more than 11 years ago | (#5701884)

What I hate about the generated GUI code was the enormous amount of useless getters and setters it made. Heck, this is a GUI, I'm going to have to use the declared datamembers in local. It did it even for labels. While you might find that elegant, I'm more in the camp of the minimalist coders and find it complete bloat.

Apart from that: VAJ is a fine tool, just not for GUI generation. Besides, I still have to find a GUI builder that does JTables right. Neither VAJ nor JBuilder apply for that one.

Re:VAJ (1)

John Harrison (223649) | more than 11 years ago | (#5702460)

You are right, I think that is the right way to do it. I used to think that it was clutter and that I could do a better job by initializing everything in a single method. Then I kept running into situations where even if I was coding by hand I found that the VAJ way saved work. Now I do it that way by default.

Re:VAJ (1)

jawtheshark (198669) | more than 11 years ago | (#5702604)

Strange... I never had any problems doing it the normal way. Honestly, if I have 50 components on my panel (which happens), I don't want 100 getter and setter methods.
But, hey, no problem... If you like it that way, VAJ must be paradise for you.

Better off by hand. (3, Informative)

Randolpho (628485) | more than 11 years ago | (#5698888)

IMO, you'd be better off learning to code the aps by hand, and using Eclipse [eclipse.org] to do it. You may also want to consider using SWT rather than Swing if you haven't learned Swing yet. Native gui components are a good thing. :)

Re:Better off by hand. (1)

Hirofyre (612929) | more than 11 years ago | (#5703357)

I agree. If you are going to do Swing components, learn GridBagLayout and code it by hand. Having said that, as someone else pointed out, VAJ is good for generating UI code for you, in a very Visual-Studio-ish manner. I used it at work for about a year and after figuring out where to inject my code and how VAJ layed out their automated code, I was able to crank out UIs quickly. One catch, since VAJ has been discontinued, the last version (that I know of) uses the 1.3 version of the Java APIs (you cannot plug in your own JVM or Java APIs) and some of the auto-generated code VAJ puts out is depricated in 1.4.

As far as SWT versus Swing, here [mail-archive.com] is an interesting look at what is going on in those two camps.

Re:Better off by hand. (1)

Randolpho (628485) | more than 11 years ago | (#5703462)

That is an amazing link, thanks for sharing.

Another Visual Age Vote Here (1)

baldass_newbie (136609) | more than 11 years ago | (#5700920)

JBuilder is good as well (less code muck) but I found VA to be fairly handy.
Have not tried eclipse yet. Will look into it.
BTW, I would have posted this to you yesterday (but /. was dead in the water), did you see this article on wireless game development on JavaSoft? http://wireless.java.sun.com/midp/articles/game/
Don't know if this would help you at all (or if you already knew about it) but I thought you should see it.

-J

Try Eclipse... (1)

(H)elix1 (231155) | more than 11 years ago | (#5701343)

Give Eclipse a whirl - I'm a former Visual Age fan, spent time with SunOne, and eventually landed on Websphere Studio, which is an IBM variant of Eclipse rev 2. Very polished. I've never tried JBuilder...

Re:Try Eclipse... (2, Informative)

Randolpho (628485) | more than 11 years ago | (#5702043)

Just to note: Eclipse does not have a GUI builder at the moment (and no plans to build one that I'm aware of). GUI coding *must* be done by hand with Eclipse.

It's still the best Java (and pretty much anything else) editor our there, bar none, IMO. Er, best *free* editor, that is. I can't afford the commercial ones, so can't comment.;)

However, be careful of the newest version (2.1). On the whole it's a good update with some useful features, but it's got a few minor bugs that need to be ironed out. The one that bothers me most is a bug in the code generator.

The code generator is very useful; with a click or two, you can automatically add an import statement for a class you just instantiated or referenced in your code, build shell code to override inherited methods, or even globally rename a class. But occasionally, and I still can't work out exactly how it happens, the code generator will "lose" some text. I quote that word because a quick save/close/reload of the document brings the correct code back up, but the display until then is wiped clean. I can't quite figure that out, but I believe they're working on it.

In all, Eclipse is an outstanding platform; 2.0.1 doesn't have that bug I mentioned, so if you stick to that version until 2.1.1 comes out you'll be happy.

Re:Try Eclipse... (1)

(H)elix1 (231155) | more than 11 years ago | (#5706191)

I'm using Websphere studio 5 - which may be Eclipse ++. I do so little client side swing/swt stuff, but you sure it does not have a builder? Thought it did. The websphere studio does.

I'll poke around...

Re:Try Eclipse... (1)

Randolpho (628485) | more than 11 years ago | (#5709740)

It's not available with Eclipse directly, no. I understood that IBM made a GUI builder but shipped it only with their commercial product; you've just confirmed it for me. :)

There are, apparently, GUI builders available as plugins for Eclipse, but I've yet to download one.

Re:Try Eclipse... (1)

(H)elix1 (231155) | more than 11 years ago | (#5712672)

Look for the SWT stuff - I pulled all the info I got for it from their site rather than IBM. I think it is driven by Eclipse rather that websphere, so it is probably just a plug-in away.

Easy to get spoiled....

Hmm... (1)

Squidgee (565373) | more than 11 years ago | (#5705993)

Netbeans or IntelliJ Idea?
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?