Search:

Type: Posts; User: 2by4

Page 1 of 2 1 2

Search: Search took 0.12 seconds.

  1. Re: Let's build tic-tac-toe (noughts and crosses) together...

    Damn, I was looking forward to this. The spec is deliberately basic, but there is opportunity to demonstrate the wider interactions: collecting requirements, negotiating and iterating requirements,...
  2. Replies
    5
    Views
    429

    Re: Use of threads in an animation

    Right. Next time, you can perhaps try to see things from the perspective of someone JUST LOOKING AT THE OP and stop making IMPLICIT references to some earlier conversation I knew nothing about. Why...
  3. Re: How can I change the values in an object instantiated from an abstract class?

    Of course it is "allowed", if only because a compiler shouldn't reject a class just because it is unfinished. But I do think an abstract class with no abstract methods may be indicative of a problem....
  4. Re: How can I change the values in an object instantiated from an abstract class?

    The problem is not the abstract class, it is the fact that you haven't told your method which rose you are working with. N.B if it is not a specific rose, you have to specify your method at class...
  5. Re: How can I change the values in an object instantiated from an abstract class?

    The OP clarifies, if you read it.

    Why is the class abstract? I don't see any abstract methods.
  6. Replies
    9
    Views
    983

    Re: 'else if' jumps to final else.

    Thank you, snowguy. This is exactly it, and why I recommend that the habit of checking is adopted as early as possible. Learning in the simple scenarios makes it second nature in the complex ones,...
  7. Let's build tic-tac-toe (noughts and crosses) together...

    This is the most appropriate forum I can find for this, but, although this is not an assignment, I don't know if it will be allowed, so it may get removed and disappear, lol.

    (I would appreciate...
  8. Replies
    16
    Views
    1,879

    Re: Give Me Some Project Ideas!

    Sounds impressive doesn't it. But it really, really isn't. It took a couple of days only and there was only one bug that I can remember, that took me a while -- the parser was occasionally truncating...
  9. Replies
    16
    Views
    1,879

    Re: Give Me Some Project Ideas!

    I dived in at the "deep end" I suppose.

    One of the first projects I did as a novice was a multi-tabbed Swing GUI which allowed two simultaneous connections to two (different) databases through...
  10. Replies
    5
    Views
    429

    Re: Use of threads in an animation

    Firstly, I didn't realise this was a "novice" or an "assignment", and I do apologise for that.

    I've been sitting here, thinking, "novice? assignment? basic?... :confused:, where are you getting...
  11. Replies
    5
    Views
    429

    Use of threads in an animation

    Split off from this thread...





    Threads are necessary. As you found out, before conflating that fact with where its action listener runs. The timer RUNS in its own thread. If the timer (not...
  12. Re: can someone show me how to change speed of an java engine.

    OK, I won't say much more. Note that timer running in its own thread is not the same as its event listener running in its own thread. So that was a red herring from you.

    The difference here, is...
  13. Re: can someone show me how to change speed of an java engine.

    As I said WHILE THE ANIMATION IS RUNNING. I don't know why you have repeated it?

    If the action listener for the speed up button is in the same thread, it won't respond WHILE THE ANIMATION IS...
  14. Re: can someone show me how to change speed of an java engine.

    You really don't understand do you? He is trying to change the speed of the animation WHILE IT IS RUNNING. Not wait for it to finish and then press the "Speed Up" button!!!

    LOL, look, when you've...
  15. Re: can someone show me how to change speed of an java engine.

    No. Go and read it again. Nowhere does he say that a USER will change the speed. He just asks how the speed can be changed. You have ASSUMED that it is a USER and not another program.





    Tell...
  16. Re: can someone show me how to change speed of an java engine.

    The OP didn't specify the case. You assumed it. Your assumption may, of course be right. I didn't assume.



    This is wrong. It does automatically run in it's own thread. That is one of its...
  17. Re: can someone show me how to change speed of an java engine.

    Of course you need a Timer. The OP is using Timer. That is not the issue. The issue is where the Timer sits -- in which thread?

    The Timer MUST sit in a separate thread. Using a Swing GUI solves...
  18. Re: can someone show me how to change speed of an java engine.

    Swing Timer is using the same principal behind the scenes. However,...

    ...although I can understand that you advise against reinventing the wheel, I think you have assumed that the speed changes...
  19. Replies
    9
    Views
    983

    Re: 'else if' jumps to final else.

    Read my post again. I said copying and pasting without double checking.

    Copying and pasting can be a good thing. I use it all the time (although not when I want to familiarize myself with a...
  20. Re: can someone show me how to change speed of an java engine.

    Load Microsoft Word on your machine :-)

    Seriously, though, you need to read up on multithreading.

    You need to have a controlling application and then launch your simulation on a separate...
  21. Replies
    14
    Views
    734

    Re: Doubles are somehow Strings?

    No problem :-)

    This is why I find these forums helpful. I learn to spot those bugs that may not spring immediately to mind.

    In this case, the big clue was in the compiler message.

    And even...
  22. Replies
    14
    Views
    734

    Re: Doubles are somehow Strings?

    import java.text.DecimalFormat;

    class Some{
    public static void main(String[] args){
    double a = new DecimalFormat("#.#").format(a);
    }
    }

    I'm sure you could have done the honours yourself?
  23. Replies
    14
    Views
    734

    Re: Doubles are somehow Strings?

    import java.text.DecimalFormat;

    class Some{
    public static void main(String[] args){
    double a = 1.0;
    a = new DecimalFormat("#.#").format(a);
    }
    }
  24. Replies
    14
    Views
    734

    Re: Doubles are somehow Strings?

    I don't know why you have defined cStart twice.

    cStart is a double that is being passed into DecimalFormat.format(), which returns String. But he has assigned this String to the double cStart,...
  25. Re: Can Java start a Processing ( Grafik Sofware ) Skript to run

    Ease up folks. Where he is saying why, I think he means how.

    I don't know about Processing or any tools that convert source code? from Processing to Java.

    In reply to your other points..
    ...
Results 1 to 25 of 48
Page 1 of 2 1 2