Search:

Type: Posts; User: rolfba

Page 1 of 2 1 2

Search: Search took 0.25 seconds.

  1. Replies
    4
    Views
    277

    I'm not sure your post title is very appropriate,...

    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
  2. Replies
    2
    Views
    185

    Another interesting question is, why would you...

    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
  3. [SOLVED] I would move the ActionListener into its own file...

    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...
  4. Replies
    3
    Views
    194

    [SOLVED] You could move your image retrieval code into its...

    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...
  5. Replies
    1
    Views
    260

    You might want to take an extra look at your...

    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...
  6. You cannot resize arrays in java. If you really...

    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...
  7. Replies
    6
    Views
    309

    When an account has been created and the user...

    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
  8. You are appending messageE to the root element...

    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.
  9. Replies
    2
    Views
    369

    Re: Inheritence and Polymorphism

    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
  10. Thread: find the error

    by rolfba
    Replies
    2
    Views
    249

    Re: find the error

    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...
  11. Replies
    1
    Views
    281

    Re: About deleting rows from table model.

    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
  12. Replies
    1
    Views
    271

    Re: Self written timer with System.nanoTime()

    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...
  13. Replies
    6
    Views
    611

    Re: aCTION EVENT WITHOUT ACTIONLISTENER

    I think a good question would be why do you want to avoid the ActionListener?

    Rolf
  14. Replies
    2
    Views
    249

    Re: Can't put decimals in my textfields?

    An integer is a non decimal number, so you might want to parse the input to a different type of number.

    Rolf
  15. Replies
    7
    Views
    222

    [SOLVED] Try having a look at the javadoc for the String...

    Try having a look at the javadoc for the String class and search for Java string concatenation on Google.

    Rolf
  16. Replies
    2
    Views
    436

    Be aware that in Java if you have two objects and...

    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...
  17. Replies
    4
    Views
    240

    I think jps had a very good idea, I would do it...

    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...
  18. Replies
    7
    Views
    222

    [SOLVED] Arrays.toString is a method for visualising...

    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
  19. I'm guessing that the code you have been given...

    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
  20. Replies
    2
    Views
    195

    Take a look at the name of your own class, and...

    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
  21. Thread: Java Song class

    by rolfba
    Replies
    11
    Views
    947

    It looks like you might still be using the old...

    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
  22. A seed is used too set a pseudo random generator...

    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...
  23. Replies
    15
    Views
    1,767

    Well the error seems to indicate that your java...

    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
  24. Replies
    2
    Views
    534

    Did you place the native dll files so they can be...

    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...
  25. Replies
    4
    Views
    794

    [SOLVED] JTextArea does indeed have the wanted...

    JTextArea does indeed have the wanted functionality. Check the API and look for "insert" and "getCaretPosition".

    Sent from my GT-I9000 using Tapatalk
Results 1 to 25 of 28
Page 1 of 2 1 2