Andrew Price - JBob

  • Substance(
  • Web log,
  • Projects ).
  • Geekdom



    This is a Java program hastily named JBob which I spent a couple of days writing during the Summer (2005).

    It was just a silly little project that ultimately does nothing useful other than helping me learn how to create Java/Swing GUI applications, extend canvas classes, use threads and create my own classes that handle their own drawing to their containing canvas objects. Unfortunately my knowledge of how gravity simulations work let me down so it's far from perfect.

    JBob Screenshot

    This is a screenshot from my Ubuntu Linux PC with a personalised Gnome theme. The GUI will use whichever theme is your default system theme. Please could someone let me know what it looks like on a Mac? [UPDATE: The trusty chckens have kindly provided me with this screenshot of JBob on their Mac.]

    Here is the JBob jar file that you can run with the command:

    $ java -jar JBob.jar

    And here is the JBob source code(zipped) for your reading pleasure. Alternatively, browse the source files individually here.

    My apologies for the total lack of comments in the code. As I said, I wrote it for learning purposes only.

    JBob Instructions

    To make JBob do things, right click in the white work area to create "point masses".

    You can then position the masses by clicking in their centre (they'll turn red once you've grabbed them) and dragging them around the work area.

    You can toggle the gravity on or off by clicking on the "Toggle gravity" button on the side bar.

    Then watch as the masses bounce frenetically, quite unlike anything else in a gravity field :/

    Lather, rinse and repeat

    [ Written in Vim | Validate my: XHTML / CSS ]