PDA

View Full Version : Got any Java questions



Mentor
23-11-2007, 10:38 PM
Well in an attempt to both actually get a topic going in this forum, and hopefully improve my own knowledge of java (which ive only been doing a little while now).
I invite you or any one else to ask any java questions they may have. I will do my best to try and answer or help out anyone asking questions in this thread that are java related.

Just as a few inital tips.
If your new to java the blueJ environment is great for getting down Object Oriented concepts, and getting you started writing java code.

If you've done another language, php or even javascript included, learning it will be easy as hell since most the concepts cross over, and its only a few words and syntax that changes.

System.out.println("text here");
prints a line to the terminal, its good for just getting a few outputs from the code your writing, aka you can actually tell if your doing anything.

// like in php, this will comment stuff out :)

Splinter
24-11-2007, 09:30 PM
Any good tutorials for java? I mean I can handle all the basics but there is such a difference between being able to complete the basics and creating a fully working program.

mousey
24-11-2007, 09:34 PM
is blue j freee?

iTechnical
24-11-2007, 10:12 PM
Yeah BlueJ is free, I used to have it :)

Mentor
25-11-2007, 12:10 AM
is blue j freee?

Yep - i thought id answer for the hell of it, as iTechnical already has.


Tutorials wize, im not much of a tutorial user, though i expect there are plenty around the net, my advice would just be to download the source to a few simple java apps, and go though them trying to understand how the stuffs working. if you get stuck, the javadocs are always a good place, or just ask in this thread if its something specific.

DeejayMachoo$
04-12-2007, 10:54 AM
is blue j freee?

notepad is your friend

Raremandan
04-12-2007, 03:48 PM
notepad is your friend

Not really BlueJ has some awesome features, especially for visual object control and learning the basics of them without delving too far into complex concepts too early on. I think thats BlueJ anyway.

Mentor
04-12-2007, 11:00 PM
Not really BlueJ has some awesome features, especially for visual object control and learning the basics of them without delving too far into complex concepts too early on. I think thats BlueJ anyway.
Sounds like the one.

Plus the compile buttons nice, as it stops u haveing to mess around in the command line (which is a pain if your java installations decided to hide in the wrong directory and u have to go lookin for em)

And of course the ever useful code highlighting (although somewhat dodgy in blueJ) is always a nice touch. Notepad++ can make up for that respect tho :)

Raremandan
05-12-2007, 01:38 AM
Sounds like the one.

Plus the compile buttons nice, as it stops u haveing to mess around in the command line (which is a pain if your java installations decided to hide in the wrong directory and u have to go lookin for em)

And of course the ever useful code highlighting (although somewhat dodgy in blueJ) is always a nice touch. Notepad++ can make up for that respect tho :)

You would be bias though, I believe you were saying a few nights ago about having the maker of BlueJ as your lecturer (jealous) :D :D but i've never really used it, I think I installed it once but then decided not to try much Java.

Mentor
05-12-2007, 03:45 PM
You would be bias though, I believe you were saying a few nights ago about having the maker of BlueJ as your lecturer (jealous) :D :D but i've never really used it, I think I installed it once but then decided not to try much Java.

If anything i should be bias against it, You'll never guess who wrote the £70 book we have to buy for the course...:rolleyes: :P

Plus netbeans and any other IDE does offer the same code highlighting and compile stuff, so my mention was really just a general reason to start we an ide instead of notepad and command prompt. :D

:Eternal
05-12-2007, 04:40 PM
Hi I'm currently making a GUI in java which is a car hier system, it has to have at least two screens so i decided to make life easier a welcome and then the booking page however i am having diffulctities with my JButton,

in my variables i have stated
// JButton to move to Customer screen
private JButton showOrderJButton;

and my code is
// set up showOrderJButton
showOrderJButton = new JButton();
showOrderJButton.setText( "Order Form" );
showOrderJButton.setBounds( 35, 250, 600, 24 );
contentPaneW.add( showOrderJButton );
showOrderJButton.addActionListener(

new ActionListener() // anonymous inner class
{
// method called when JButton is pressed
public void actionPerformed( ActionEvent event )
{
showOrderJButtonActionPerformed( event );
}

} // end anonymous inner class

); // end call to addActionListener

However when i try to complie it i get an error stating can not find symbol.

Any ideas?
Thanks in advanced

Mentor
06-12-2007, 11:57 PM
What symbol does it say it cannot find?
It useually means your useing a varible that hasnt been defined? contentPaneW is definally correct? and showOrderJButtonActionPerformed is definally a method somewhere in the class?

Want to hide these adverts? Register an account for free!