Results 1 to 3 of 3
Thread: Grid Painting?
- 02-26-2011, 02:02 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 9
- Rep Power
- 0
- 02-26-2011, 03:46 AM #2
Member
- Join Date
- Feb 2011
- Posts
- 18
- Rep Power
- 0
something like this should work:
the int "l" is used to draw a line from the top left to the bottom right and the int "r" is used to draw a line from the top right to the bottom leftJava Code:int h; // height of grid int l = 0; int r = 2*h; for(int i = 0; i < h; i++){ grid.setColor(i,l,Color.RED); l++; grid.setColor(i,l,Color.RED); l++; grid.setColor(i,r,Color.RED); r--; grid.setColor(i,r,Color.RED); r--; }
- 02-26-2011, 07:04 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 9
- Rep Power
- 0
Similar Threads
-
painting whole label
By simprepol in forum AWT / SwingReplies: 9Last Post: 01-27-2011, 08:10 AM -
Painting Problem!
By Jcbconway in forum Advanced JavaReplies: 3Last Post: 11-17-2010, 04:14 AM -
Painting in SWT
By jionnet in forum SWT / JFaceReplies: 9Last Post: 09-24-2010, 06:52 AM -
Painting
By xael in forum New To JavaReplies: 6Last Post: 09-06-2010, 05:10 AM -
Objects painting themselves?
By martypapa in forum Java 2DReplies: 19Last Post: 02-06-2010, 04:08 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks