Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - keesfani

Pages: 1 ... 78 79 80 81 82 [83] 84 85 86 87 88 ... 132
1231
Off Topic / Re: I'm GIFTING! ~ REQUESTS UNDER $20 HERE
« on: August 06, 2011, 02:06:11 PM »
Code: [Select]
import javax.swing.*;
import javax.swing.event.*;

import java.awt.event.*;
import java.awt.*;
import java.util.*;

public class IkeTheGeneric extends JFrame{

JLabel copy;
JLabel how;
JButton start;
JButton add;
JTextField enter;
JTextField winner1;
JTextField winner2;
JTextField winner3;
JTextField winner4;
JTextField winner5;
JTextField winner6;
JList candidates;
JRadioButton four;
JRadioButton six;
ButtonGroup num;
static String[] canarray = {};
static ArrayList<String> candidateslist = new ArrayList();
static int nummers=0;
Font font;
static int way;

public static void main(String[] args){
IkeTheGeneric ike = new IkeTheGeneric();
}
public IkeTheGeneric(){
super("IkeTheGeneric's Hat");
setLayout(new FlowLayout());
setSize(250,400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBackground(Color.BLUE);
setVisible(true);

final JLabel how = new JLabel("0 People are currently in the contest");
add(how);

enter = new JTextField("Enter Candidate Here",20);
add(enter);

add = new JButton("Add the candidate");
add(add);

four = new JRadioButton("Four people",false);
six = new JRadioButton("Six people",true);
add(four);
add(six);
num = new ButtonGroup();
num.add(four);
num.add(six);

candidates = new JList(canarray);
candidates.setVisibleRowCount(4);
candidates.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
add(new JScrollPane(candidates));

start = new JButton("Start");
add(start);

winner1 = new JTextField("Winner 1 will be displayed here",20);
winner1.setEditable(false);
add(winner1);
winner2 = new JTextField("Winner 2 will be displayed here",20);
winner2.setEditable(false);
add(winner2);
winner3 = new JTextField("Winner 3 will be displayed here",20);
winner3.setEditable(false);
add(winner3);
winner4 = new JTextField("Winner 4 will be displayed here",20);
winner4.setEditable(false);
add(winner4);
winner5 = new JTextField("Winner 5 will be displayed here",20);
winner5.setEditable(false);
add(winner5);
winner6 = new JTextField("Winner 6 will be displayed here",20);
winner6.setEditable(false);
add(winner6);

font = new Font("Serif",Font.ITALIC,10);
copy = new JLabel("Copyright © 2011 keesfani. All rights reserved.");
copy.setFont(font);
add(copy);

add.addActionListener(
new ActionListener(){
public void actionPerformed(ActionEvent event) {

candidateslist.add(enter.getText());
nummers++;

String[] people = new String[nummers];

people = candidateslist.toArray(new String[candidateslist.size()]);

candidates.setListData(people);
how.setText(nummers+" People are currently in the contest");

}

}
);

four.addItemListener(
new ItemListener(){
public void itemStateChanged(ItemEvent event) {
if(event.getSource() == four && event.getStateChange() == event.SELECTED){
way = 4;

winner5.setText("Winner 5 will be displayed here");
winner6.setText("Winner 6 will be displayed here");
}
}
}
);

six.addItemListener(
new ItemListener(){
public void itemStateChanged(ItemEvent event) {
if(event.getSource() == six && event.getStateChange() == event.SELECTED){
way = 6;
}
}
}
);

start.addActionListener(
new ActionListener(){
public void actionPerformed(ActionEvent event) {
Collections.shuffle(candidateslist);

if(way == 4){
winner1.setText(candidateslist.get(0));
winner2.setText(candidateslist.get(1));
winner3.setText(candidateslist.get(2));
winner4.setText(candidateslist.get(3));
}else{
winner1.setText(candidateslist.get(0));
winner2.setText(candidateslist.get(1));
winner3.setText(candidateslist.get(2));
winner4.setText(candidateslist.get(3));
winner5.setText(candidateslist.get(4));
winner6.setText(candidateslist.get(5));
}
}

}
);

candidates.addListSelectionListener(new ListSelectionListener(){
public void valueChanged(ListSelectionEvent event) {
int well;

well = JOptionPane.showConfirmDialog(null, "Are you sure that you want to delete '"+ candidateslist.get(candidates.getSelectedIndex())+"' from the list?");

if(well==0){

candidateslist.remove(candidates.getSelectedIndex());
nummers--;
how.setText(nummers+" People are currently in the contest");
String[] people = new String[nummers];

people = candidateslist.toArray(new String[candidateslist.size()]);

candidates.setListData(people);
}
}

});

}
}

This is the code, I did not do anything with it.

1232
Off Topic / Re: I'm GIFTING! ~ REQUESTS UNDER $20 HERE
« on: August 06, 2011, 02:04:24 PM »

1233
Off Topic / Re: I'm GIFTING! ~ REQUESTS UNDER $20 HERE
« on: August 06, 2011, 02:00:03 PM »

1234
Off Topic / Re: I'm GIFTING! ~ REQUESTS UNDER $20 HERE
« on: August 06, 2011, 01:39:50 PM »
I am

Yay, awesome. It took me like 2 hours to write it, I hope you like it.

1235
Off Topic / Re: I'm GIFTING! ~ REQUESTS UNDER $20 HERE
« on: August 06, 2011, 10:42:47 AM »
I want Super Meat Boy
Steam Account: keesfani

1236
Off Topic / Re: I'm GIFTING! ~ REQUESTS UNDER $20 HERE
« on: August 06, 2011, 10:42:00 AM »
I am done with IkeTheGeneric´s hat.



DOWNLOAD

Note: You have to maximize and resize the GUI in order to let every item appear in this lovey GUI.

1237
Off Topic / Re: I'm GIFTING! ~ REQUESTS UNDER $20 HERE
« on: August 05, 2011, 09:53:30 PM »
I'm writing a program for you to make this easier for you, it should be done by tomorrow.



Also I want Super Meat Boy
Steam Account: keesfani

1238
Off Topic / Re: forget you
« on: June 01, 2011, 08:39:11 PM »

1239
Off Topic / Re: Rate the above user's stupidity.
« on: May 15, 2011, 05:47:56 PM »
YOU'RE ON FIRE.

10/10

1241
Off Topic / Re: Large numbers.
« on: May 15, 2011, 05:22:56 PM »
NO BAD KEESFANI *sprays water*

lol I just took a shower XD

1242
Off Topic / Re: Large numbers.
« on: May 15, 2011, 04:46:22 PM »
99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999999999 99999999999999999999999

1243
Add-Ons / Re: Script_LateJoin
« on: May 15, 2011, 11:41:28 AM »

1244
Off Topic / Re: Pointless websites topic
« on: May 15, 2011, 11:36:45 AM »
pointless bump

1245
oh god lol http://www.youtube.com/watch?v=LEWHvuCNbq8&feature=related

I love how after I posted this that there came allot of hate comments about france  :cookieMonster:

Pages: 1 ... 78 79 80 81 82 [83] 84 85 86 87 88 ... 132