Awesome pictures created in Java.

Recommended Videos

Ghonzor

New member
Jul 29, 2009
958
0
0
So Escapist, let's see if you can let your creativity and nerdiness shine together for once.

Submit your best pictures, drawn in Java (if you can, code and all if you want).
 

Ghonzor

New member
Jul 29, 2009
958
0
0
Flishiz said:
Well it appears someone discovered Objectdraw.
Heh, I love programming. I just wanted to see how creative people could get.
Maybe I chose too nerdy of a medium.
 

Flishiz

New member
Feb 11, 2009
882
0
0
Ghonzor said:
Flishiz said:
Well it appears someone discovered Objectdraw.
Heh, I love programming. I just wanted to see how creative people could get.
Maybe I chose to nerdy of a medium.
I remember making objectdraw stuff back when I was a wee-un of a computer scientist. I think most of that archaic junk is long gone, now.
 

Ghonzor

New member
Jul 29, 2009
958
0
0
Flishiz said:
Ghonzor said:
Flishiz said:
Well it appears someone discovered Objectdraw.
Heh, I love programming. I just wanted to see how creative people could get.
Maybe I chose too nerdy of a medium.
I remember making objectdraw stuff back when I was a wee-un of a computer scientist. I think most of that archaic junk is long gone, now.
Well, I also figured that if I shared my hobby (and...job...) with others, maybe it would be much less esoteric. Meh, it was worth a shot. I still remember the first time I learned the various ways to draw stuff in Java. *sigh* Good times...
 

redsoxfantom

New member
Jul 22, 2009
118
0
0
If anyone's interested, here's the code for a picture I had to draw for a Java class:
import java.awt.*;
import javax.swing.*;
import java.util.Random;
public class PacMan extends JPanel
{
public PacMan()
{
setBackground(Color.black);
setPreferredSize(new Dimension(600,400));
}
public void paintComponent(Graphics page)
{
Random gen = new Random();
int num;
super.paintComponent(page);

//draw level
page.setColor(Color.white);
page.drawLine(1,200,400,200);
page.drawLine(1,199,400,199);
page.drawLine(1,201,400,201);
page.drawLine(1,198,400,198);
page.drawLine(1,202,400,202);

//draw pellets
for(int i = 0; i < 5; i++)
{
num = gen.nextInt(9);
switch (num)
{
case 0:
page.fillRect(300,90,20,20);
break;
case 1:
page.fillRect(400,90,20,20);
break;
case 2:
page.fillRect(500,90,20,20);
break;
case 3:
page.fillRect(500,200,20,20);
break;
case 4:
page.fillRect(500,310,20,20);
break;
case 5:
page.fillRect(400,310,20,20);
break;
case 6:
page.fillRect(300,310,20,20);
break;
case 7:
page.fillRect(200,310,20,20);
break;
case 8:
page.fillRect(100,310,20,20);
break;
default:
break;
}
}

//draw PacMan
page.setColor(Color.yellow);
page.fillOval(120,30,150,150);
page.setColor(Color.black);
for(int i = 0; i < 120; i++)
{
page.drawLine(195,105,300,(45+i));
}

//draw red ghost
page.setColor(Color.red);
page.fillOval(-60,30,120,120);
for(int d = 0; d <= 59; d++)
{
page.drawLine(0,180,d,80);
}
for(int d = 0; d <= 59; d++)
{
page.drawLine(30,180,d,80);
}
for(int d = 0; d <= 59; d++)
{
page.drawLine(59,180,d,80);
}
page.setColor(Color.white);
page.fillOval(10,60,40,40);
page.setColor(Color.blue);
page.fillOval(30,80,18,18);
}
}

It's pretty basic.
 

cheese_wizington

New member
Aug 16, 2009
2,328
0
0
Ghonzor said:
Flishiz said:
Well it appears someone discovered Objectdraw.
Heh, I love programming. I just wanted to see how creative people could get.
Maybe I chose to nerdy of a medium.
Wrong form of to.

And far be it from me to stifle your flare, but this isn't 4chan. Your predecessor assumed Rural Forums were nerdy, ended up havin' a nervous breakdown.

http://media.giantbomb.com/uploads/1/19300/1077680-mv5bmtyxndq5ntywof5bml5banbnxkftztywmdaymzq3._v1._sx462_sy325__super.jpg
 

Ghonzor

New member
Jul 29, 2009
958
0
0
Old Trailmix said:
Ghonzor said:
Flishiz said:
Well it appears someone discovered Objectdraw.
Heh, I love programming. I just wanted to see how creative people could get.
Maybe I chose to nerdy of a medium.
Wrong form of to.

And far be it from me to stifle your flare, but this isn't 4chan. Your predecessor assumed Rural Forums were nerdy, ended up havin' a nervous breakdown.

http://media.giantbomb.com/uploads/1/19300/1077680-mv5bmtyxndq5ntywof5bml5banbnxkftztywmdaymzq3._v1._sx462_sy325__super.jpg
Gah! I, of all people, should realize what form of to/two/too to use. How could I let this happen?