pretty basic Java question

Discussion in 'OT Technology' started by Euclid, Feb 26, 2006.

  1. Euclid

    Euclid New Member

    Joined:
    Apr 19, 2004
    Messages:
    8,139
    Likes Received:
    0
    Location:
    Nashville, TN
    I would like to implement the game Planarity. http://www.planarity.net/

    What API should I look at to do the interface? In particular I want to display objects which are position aware and the user can click and drag them with the mouse. I figure a lot of this is already built-in to some library or another.

    It's been a long time since I did any java so I don't really know where to begin looking for this. :hs:
     
  2. Euclid

    Euclid New Member

    Joined:
    Apr 19, 2004
    Messages:
    8,139
    Likes Received:
    0
    Location:
    Nashville, TN
    Anyone?
     
  3. Euclid

    Euclid New Member

    Joined:
    Apr 19, 2004
    Messages:
    8,139
    Likes Received:
    0
    Location:
    Nashville, TN
  4. wparsons

    wparsons New Member

    Joined:
    Feb 21, 2006
    Messages:
    62
    Likes Received:
    0
    You'll probably want to look at the gui API, as well as the graphics stuff(not sure of API names). Why do you want to implement it yourself though, just fo fun?
     
  5. rsxm5

    rsxm5 OT Supporter

    Joined:
    Oct 13, 2002
    Messages:
    2,961
    Likes Received:
    0
    Location:
    San Diego, CA
    You might be able to do it with "awt", but likely you will end up using "swing"
     
  6. Euclid

    Euclid New Member

    Joined:
    Apr 19, 2004
    Messages:
    8,139
    Likes Received:
    0
    Location:
    Nashville, TN
    Is this a serious reply? :squint:
     
  7. Corp

    Corp OT Supporter

    Joined:
    Sep 11, 2003
    Messages:
    28,201
    Likes Received:
    0
    Location:
    Providence, RI
    java.awt is the advanced windowing toolkit, javax.swing is another package for graphics that is used for graphics.
     
  8. Euclid

    Euclid New Member

    Joined:
    Apr 19, 2004
    Messages:
    8,139
    Likes Received:
    0
    Location:
    Nashville, TN
    Thanks, but I'm just a little rusty... I still know what awt and swing are though. ;)

    I found a good toolkit which is pretty much exactly what I was looking for. Cool demo:

    http://jgrapht.sourceforge.net/visualizations.html

    At first glance, they don't seem to have any planarity algorithms implemented, but I haven't gotten very far with the javadocs yet. This will be a nice starting point for my project though. :coold:
     

Share This Page