Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Some design tips please

Jay Mistry
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am very new to Java2D, actually graphics programming in general. I want to make this applicaition that simply displays a vertical thermometer that displays time instead of temp. I should be able to add objects to either side of the thermometer display and those objects are nothing more than strings. I also want to be able to interact with the thermometer by allowing users to click on one of the objects hanging out at a certain time on the meter stick and do some things with it. I haven't a clue of how I could go about designing this. For now I have the following; its an attempt to design this thing.
I have a data structure that is like a belt with nodes being added to it. These nodes have two vectors one for the leftside of the thermometer and the other for the right. I can add stuff to the belt by time, so if I say that add this object to the left side of the belt at this time, the belt will add that a node with the time specified with a object on the left chain of the node. I want to display this information on a JPanel and so far have been sucessful in drawing the thermometer with times on it, however I am having hard time drawing the data object and don't know how, provided that I can draw the object, can I go about picking it?
I would really appreciate any help I can get.
Thank you very much,
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic