How do yah make something like this?

I'm trying to make simething like this. However I'm stuck on what sort of algorithm would be used. Any idea? Thanks a bunch in advance for any help!http://i91.photobucket.com/albums/k293/rawlehypermode/Untitled.jpg
[230 byte] By [emerala] at [2007-11-26 22:50:43]
# 1

You meant something like this ?

import java.awt.Dimension;

import java.awt.Graphics;

import javax.swing.JFrame;

import javax.swing.JPanel;

public class LineDemo extends JPanel {

final static int SIZE = 640;

final static int STEP = 20;

protected void paintComponent(Graphics g) {

for (int i = 0; i < SIZE; i += STEP) {

g.drawLine(i,0,SIZE,i);

g.drawLine(SIZE,i,SIZE-i,SIZE);

g.drawLine(SIZE-i,SIZE, 0, SIZE - i);

g.drawLine(0, SIZE - i,i,0);

}

}

public static void main(String[] args) {

JFrame frame = new JFrame("Line demo");

frame.add(new LineDemo());

frame.setPreferredSize(new Dimension(SIZE+STEP,SIZE+2*STEP));

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.pack();

frame.setVisible(true);

}

}

AlexeyUshakova at 2007-7-10 12:12:08 > top of Java-index,Security,Cryptography...
# 2
Exactly! Thanks a bunch sir!
emerala at 2007-7-10 12:12:08 > top of Java-index,Security,Cryptography...
# 3
Don't forget about dukes :)
AlexeyUshakova at 2007-7-10 12:12:08 > top of Java-index,Security,Cryptography...
# 4
(And this doesn't look like a cheap school assignment; got without any effort at all?)
agerard2a at 2007-7-10 12:12:08 > top of Java-index,Security,Cryptography...