Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java program development - Sun One query

Status
Not open for further replies.

groston

IS-IT--Management
Dec 31, 2001
141
US
I am trying to teach myself Java. I have considerable experience with C (including Win 32 library) and VB for applications. I am trying to use Sun One for Java development.

Is it just me, or does this tool seem to make learning Java about ten times harder than just using a text editor? For example, I tried to create a form with 10 buttons (think calculator). The IDE named each button independently and prevented me from remaking them as an array of buttons. Seems odd.

Can anyone please offer a suggestion? Teaching an old dog new tricks is hard enough without added confusion.

Thanks!

gerry@pairofdocs.net
 
I'd suggest getting a good Swing tutorial (or check out Sun's online tutorial). Chances are you've just misunderstood what's happening.

Assuming you've setup a pane with a vertical BoxLayout to hold each row of buttons, you'll then need several horizontal BoxLayout panes (one for each row) to hold the actual buttons. The IDE is just working the same way Swing does - I use the same IDE & find it very helpful.

As with most IDEs, it just generates a unique name for each object. You can rename the objects afterwards, to make them meaningful.
 
The similarities between C and java can mislead you into thinking you can just code the way you always did, only with a different compiler. My advice is NOT to try to write C programs in java. Start out writing them as java programs. I started out that way also ("Why CAN'T I create a structure?"). I look back on my early programs now and cringe because I was trying to force java do to C things.

As far as the IDEs go, they provide shortcuts and GUI ways to do things, but you miss out on the learning part. The IDEs will construct code that works but you have no idea why. My other advice is to code by hand first (text editor and command line compiler) until you understand what's going on in the code. Then use an IDE to automate the boring work later.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top