Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Leehro
Feb 20, 2003

"It's a gaming ship."
Glad to see this thread here. It looked like java was dead based on the activity in this forum. I didn't start writing java until about a year ago, and started using an IDE just a few months ago. I started with Eclipse because I read about its tomcat plugin. It absolutely blew my mind that I could run a webapp in tomcat, play around on my browser, and be debugging it in eclipse.

When I had to write a GUI application, I switched to NetBeans 6.0, which I absolutely love. It seems cleaner and simpler than Eclipse, and the GUI designer is terrific. I'm also very pleased with the subversion integration (showing changes) and the build configurations and how it creates a "dist" directory complete with a README and all of your JARs in a lib folder.

So no questions now, but I'm sure I'll have one soon.

Adbot
ADBOT LOVES YOU

Leehro
Feb 20, 2003

"It's a gaming ship."

FuzzyBuddha posted:

Stupid IDE question....

I've been using JCreator LE, another free Java IDE, and, other than plain text editors, the only thing I've used for Java programming. I'm almost ashamed to admit that I haven't played around with any others. It's just been a "it's what I downloaded first, so that's what I use" kinda thing.

What benefits do the others have and how does JCreator rank among the others?

after a quick look at the features of JCreator Lite, I can point out a few things that NetBeans has that it doesn't:

Code Completion
Context-sensitive help
Debugger
bean methods wizard

There's a lot more. NetBeans seems more friendly whether you started your application there or you're working from existing sources. It creates ant build scripts for you. The refactoring is incredibly useful -- whether you want to rename a class/package or easily add get/set (bean) methods to something. The javadoc popups and code completion have really been useful. It just makes a lot more sense than any other IDE I've used.

Plus it's cross platform, free, and works with some other languages. There are a lot of plugins too, and I think it's less cluttered than Eclipse.

Try NetBeans for a day or even an hour. It's easy to get up and running.

Leehro
Feb 20, 2003

"It's a gaming ship."
Does anyone have a quick tutorial or example for one of the EE persistence APIs? Everything I come across seems to be part of some framework.

Leehro
Feb 20, 2003

"It's a gaming ship."

FuzzyBuddha posted:

Ok, a bit late but... I want to thank you for this suggestion, if for no other reason than it tags errors as I type. I'm a horrible typer and this has already saved a lot of headache.

Yeah it's a nice set of tracks to keep you on the right path.

zootm posted:

Using "ctrl-space" you'll probably never have to type anything again. :)

I didn't know about this, and the times when I wanted the autocomplete to kick in, I'd usually backspace over the ., type it again, and wait. Thanks!

Leehro
Feb 20, 2003

"It's a gaming ship."
Yeah, either your variables aren't getting reset -or- you're not getting the random number range right.

If you have a debugger, you can find this easily.

Leehro
Feb 20, 2003

"It's a gaming ship."
Are they javax.swing.JComboBox objects?

There's a few ways to do it. The most basic would probably be this:

1. Create 3 instances of a DefaultComboBoxModel, one for each JComboBox. assign them with JComboBox.setModel(). Add all the choices to all of them.

2. Create add Action Listeners for each JComboBox. When you change the first combo box, it should update 2 and 3 to remove the choice you selected (removeElement()). When you change the second, it should update the third to remove that choice too.

You can get fancier than that, that should get you started. Using an IDE will help guide you along. I ran through it in NetBeans in about 5 minutes.

Leehro
Feb 20, 2003

"It's a gaming ship."
Coming from a C/C++ background on pointers and references, that was a very helpful discussion. I was always suspicious of java's magic when it comes to passing around objects.

My question relates to the garbage collection in the example. How would you get rid of the point object entirely? just by setting pnt = null in the main method?

Adbot
ADBOT LOVES YOU

Leehro
Feb 20, 2003

"It's a gaming ship."
How are you building the floats?

2 things to keep in mind

1. If you do any kind of byte addition or arithmetic, they will be sign-extended to integers. If you have Byte b, use b & 0xFF in arithmetic operations.

2. I wrote some code to read some image data out of a proprietary format, and mostly used ByteBuffer objects to get the int/float data from the header, especially because I needed to be able to set the Endian-ness.

http://java.sun.com/j2se/1.4.2/docs/api/java/nio/ByteBuffer.html

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply