I'm not sure your post title is very appropriate, but search for any beginner tutorial on Java on Google. I'm sure any tutorial will cover addition of two numbers rather quickly.
Rolf
Type: Posts; User: rolfba
I'm not sure your post title is very appropriate, but search for any beginner tutorial on Java on Google. I'm sure any tutorial will cover addition of two numbers rather quickly.
Rolf
Another interesting question is, why would you want to access memory like this?
Maybe another approach would be better and allow you to use Java.
Rolf
I would move the ActionListener into its own file and then make it take your main Class as an argument to it's constructor. This also means that you need to make getter methods for all the fields you...
You could move your image retrieval code into its own method, if you make the method signature something like this:
public JLabel retrieveImageLabel(int imageId)
Then change the code to lookup...
You might want to take an extra look at your bounds check on hour and minutes in your constructor, what if I wanted to input the time 23:59? Or 01:59.
As for your methods you could use the...
You cannot resize arrays in java. If you really need to go with arrays you need to create a new array of the desired size and copy your data over. Instead I would use a list, try and lookup ArrayList...
When an account has been created and the user wants to deposit money, how does the program know which of the 50 Account array entrances that the money should be deposited to?
Rolf
You are appending messageE to the root element twice, first to rootE and then later to root. both which point to the same document root. This might be where the exception is thrown.
Math.random() returns a double between 0 and 1, java has a class Random that might be more appropriate for your use. Try looking at its javadoc.
Rolf
Your program tries to connect to a TCP socket on localhost using port 13. Does anything actually run to accept connections on port 13?
If you are trying to make 2 of your programs talk together...
Have a look at the javadoc for the DefaultTableModel, it has the needed delete methods. Then you have to create your JTable with your own DefaultTableModel and use that.
Rolf
Try and insert some debug printing before and after your drop while loop. And try to explain your idea behind the flow of the program execution. Also what is the expected behavior of your code when...
I think a good question would be why do you want to avoid the ActionListener?
Rolf
An integer is a non decimal number, so you might want to parse the input to a different type of number.
Rolf
Try having a look at the javadoc for the String class and search for Java string concatenation on Google.
Rolf
Be aware that in Java if you have two objects and do an == compare, you are checking if the two objects are the same exact identical object, not if the two objects are equal. To do the later you...
I think jps had a very good idea, I would do it the other way around though. First try to write the program in notepad, then check up on it in your favourite ide and think about any mistakes you...
Arrays.toString is a method for visualising arrays, so the square brackets are there to show that it is an array.
Try and explain what it is exactly you want your code to do.
Rolf
I'm guessing that the code you have been given uses the class Graphics2D. You should read up on the javadoc for this class:
http://docs.oracle.com/javase/7/docs/api/java/awt/Graphics2D.html
Rolf
Take a look at the name of your own class, and then tell me what you think will happen when you call, new StringBuffer. How does Java know which one you mean?
Rolf
It looks like you might still be using the old SimpleStack class in your test file (file 3). Instead use the new SimpleSongStack you created.
Rolf
A seed is used too set a pseudo random generator to a specific state.
So if you create two Random objects with the same seed it will repeat the same random sequence.
This usefull if you need...
Well the error seems to indicate that your java file is not named correctly. The other two is just warnings because you are using classes that might be removed in later versions of java.
/Rolf
Did you place the native dll files so they can be loaded?
When using a NetBeans project the correct placement is usually in the root of your projects folder.
If you are using the new jogl 2 there...
JTextArea does indeed have the wanted functionality. Check the API and look for "insert" and "getCaretPosition".
Sent from my GT-I9000 using Tapatalk