0

Hi I'm currently making an application for some research I am doing. I need to be able to draw on a grid in a canvas. More detail:

  1. I need to create the grid, possibly displaying it in the canvas itself, with a customizable number of vertical/horizontal grid markers.
  2. I need to be able to draw points that snap only to grid line intersections.
  3. I need to be able to draw lines that can only snap to grid line intersections as well.
  4. I need a way to fill in an area that has been bounded by the lines that I drew with a certain color.

Please note that I am not looking for someone to write the program for me, I just need help taking that first step and where to look for additional resources etc. I have no idea where to begin. Also I am using NetBeans GUI Builder, if that is helpful. All I have now is the canvas set up. I have no idea where to go from there. Thank you very much.

Andrew Thompson
  • 166,747
  • 40
  • 210
  • 420
GregoryNeal
  • 126
  • 2
  • 7
  • What IDE Are you using? Netbeans or Eclipse. If anything do some research on JTables – yams Jul 01 '13 at 22:25
  • 1
    Why AWT rather than Swing? See this answer on [Swing extras over AWT](http://stackoverflow.com/a/6255978/418556) for many good reasons to abandon using AWT components. If you need to support older AWT based APIs, see [Mixing Heavyweight and Lightweight Components](http://www.oracle.com/technetwork/articles/java/mixing-components-433992.html). – Andrew Thompson Jul 02 '13 at 04:14
  • actually, this is not the kind of questions that should be asked here (because it's not answerable due to its broadness) - your best bet is to start _somewhere_ and come back with a concrete problem. – kleopatra Jul 02 '13 at 08:12
  • The example cited [here](http://stackoverflow.com/a/11944233/230513) may be a starting point for refining your question. – trashgod Jul 02 '13 at 10:16

0 Answers0