The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Looking for guidance and instructions

In the book we are reading for my Java 2 class there is a section on GUI that gave me some code, but I don't know how to use it in a text editor (textpad) to make the code so it will work.
There are 2 code sections they gave us in the book and I don' t know whether or not I am supposed to put them both into one java file or how I am supposed to do it.

**( Oh Yeah I also have Netbeans available but am not sure how to use it either)**

Re: Looking for guidance and instructions

Is there a problem with your code or do you no know how to run it. If you don't know how to run it, have a quick search on Google, there'll be sites there with tutorials on running from command line and guides for Netbeans. Check the tutorials section on this forum as well.

Re: Looking for guidance and instructions

.java files need to be compiled into .class files before they become runnable by the JRE (Java Runtime Environment).

This can be done with the command line, but it is usually best to get an IDE (Integrated Development Environment). If you have Netbeans, that can be a great tool, but if you are just making small applications and self-coding your GUIs (Graphical User Interface), I would recommend a light-weight IDE instead of Netbeans. Notepad is about as light-weight as it gets, but I would go a step above that. I hear Netbeans is great, but I think using it to make small learning programs is overkill.

Personally, I have had tremendous success with JCreator (JCreator &mdash; Java IDE). If you download the LE version, it is free. JCreator will allow you to create, compile, and run java code without having to make projects for them (but you can still make projects if you want). Being a light-weight IDE, the LE version lacks some of the luxuries of things like Debuggers and auto-imports, but println statements can be used to debug code yourself and it is probably best to learn how to debug code without a debugger. As for the imports, it is also probably best to learn how to find a library to import it. If you need help finding libraries, I'll provide you with a simple Google search you can do.

When asking for help, please follow these guidelines to receive better and more prompt help:
1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
2. Give full details of errors and provide us with as much information about the situation as possible.
3. Give us an example of what the output should look like when done correctly.

Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/