Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

CS is smalltime

Name: Anonymous 2010-10-27 0:50

Game Designer here, CS degrees are small time. Enjoy your no job.

Name: You Cuntface 2010-10-27 0:55

This was a terrible thread on /v/, and by making it here it's become even worse. It's bad and you should feel bad.

Name: Anonymous 2010-10-27 0:56

>>2
the best part is, is that it'll never die on /prog/

Name: vvvvv 2010-10-27 0:56

OP is a fag.

Name: Anonymous 2010-10-27 1:00

Game designer? Hahahahahahahahaha. Oh, sorry, what were you talking about?

Name: Anonymous 2010-10-27 1:03

now now, cs is a very useful degree to have if you live in india

Name: Anonymous 2010-10-27 2:29

/g/ just told me to fuck off so maybe you guys can help
this program should work but something isnt executing properly
what is it?

package guifour;

import java.awt.Container;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;

public class Rectangle
                      extends JFrame {

 
   
   
    private static final long serialVersionUID = 1L;
    private JLabel lengthL, widthL,
           areaL, perimeterL;
    private JTextField lengthTF, widthTF,areaTF, perimeterTF;

    private JButton calculateB, exitB;

    private CalculateButtonHandler cbHandler;

    private ExitButtonHandler ebHandler;

    private static final int WIDTH = 400;
    private static final int HEIGHT = 300;


    public Rectangle ()
    {
                        // Create four labels
            lengthL = new JLabel("Enter the length: ",
                                  SwingConstants.RIGHT);
            widthL = new JLabel("Enter the width: ",
                                     SwingConstants.RIGHT);
            areaL = new JLabel("Area: ",SwingConstants.RIGHT);
            perimeterL = new JLabel("Perimeter: ",
                                        SwingConstants.RIGHT);

                          //Create four textfields
            lengthTF = new JTextField(10);
            widthTF = new JTextField(10);
            areaTF = new JTextField(10);
            perimeterTF = new JTextField(10);

                          //create Calculate Button
            calculateB = new JButton("Calculate");
            cbHandler = new CalculateButtonHandler();
            calculateB.addActionListener((ActionListener) cbHandler);
            //calcualte button you are making the program listen to it.
                          //Create Exit Button
            exitB = new JButton("Exit");
            ebHandler = new ExitButtonHandler();
            exitB.addActionListener(ebHandler);

            //Set the title of the window
            setTitle("Area and Perimeter of a Rectangle");

            //Get the container
            Container pane = getContentPane();

            //Set the layout
        pane.setLayout(new GridLayout(5,2));

         //Place all items created
            pane.add(lengthL);
            pane.add(lengthTF);
            pane.add(widthL);
            pane.add(widthTF);
            pane.add(areaL);
            pane.add(areaTF);
            pane.add(perimeterL);
            pane.add(perimeterTF);
            pane.add(calculateB);
            pane.add(exitB);

                        //set the size of the window and display it
            setSize(WIDTH,HEIGHT);
            setVisible(true);
                setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    private class CalculateButtonHandler implements ActionListener
    {
            public  void actionPerformed1(ActionEvent e)
            {
                double width, length, area, perimeter;

                length = Double.parseDouble(lengthTF.getText());
                width = Double.parseDouble(widthTF.getText());
                area = length * width;
                perimeter = 2 * (length + width);

                areaTF.setText("" + area);
                perimeterTF.setText("" + perimeter);
            }

            @Override
            public void actionPerformed(ActionEvent arg0) {
                // TODO Auto-generated method stub
               
            }
    }

    private class ExitButtonHandler implements ActionListener
    {
            public void actionPerformed1(ActionEvent e)
            {
                    System.exit(0);
            }

            @Override
            public void actionPerformed(ActionEvent arg0) {
                // TODO Auto-generated method stub
               
            }
    }

    public static void main(String[] args)
   
    {
}}//end of rectangle

Name: Anonymous 2010-10-27 2:46

/g/ just told me to fuck off so maybe you guys can help
I've never seen anything this ironic.

Name: Anonymous 2010-10-27 4:35

>>7
I see you're in a world of pane.

Name: Anonymous 2010-10-27 4:43

>>9
+5 Funny

Name: Anonymous 2010-10-27 4:47

HTH, HAND

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Rectangle extends JFrame {
    private JLabel lengthL, widthL, areaL, perimeterL;
    private JTextField lengthTF, widthTF,areaTF, perimeterTF;
    private JButton calculateB, exitB;

    private static final int WIDTH = 400;
    private static final int HEIGHT = 300;

    public Rectangle () {
        lengthL = new JLabel("Enter the length: ", SwingConstants.RIGHT);
        widthL = new JLabel("Enter the width: ", SwingConstants.RIGHT);
        areaL = new JLabel("Area: ",SwingConstants.RIGHT);
        perimeterL = new JLabel("Perimeter: ", SwingConstants.RIGHT);

        lengthTF = new JTextField(10);
        widthTF = new JTextField(10);
        areaTF = new JTextField(10);
        perimeterTF = new JTextField(10);

        calculateB = new JButton("Calculate");
        calculateB.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                double width, length, area, perimeter;

                length = Double.parseDouble(lengthTF.getText());
                width = Double.parseDouble(widthTF.getText());
                area = length * width;
                perimeter = 2 * (length + width);

                areaTF.setText("" + area);
                perimeterTF.setText("" + perimeter);
            }
        });

        exitB = new JButton("Exit");
        exitB.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });

        setTitle("Area and Perimeter of a Rectangle");
       
        Container pane = getContentPane();
        pane.setLayout(new GridLayout(5,2));
        pane.add(lengthL);
        pane.add(lengthTF);
        pane.add(widthL);
        pane.add(widthTF);
        pane.add(areaL);
        pane.add(areaTF);
        pane.add(perimeterL);
        pane.add(perimeterTF);
        pane.add(calculateB);
        pane.add(exitB);

        setSize(WIDTH,HEIGHT);
        setVisible(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
        new Rectangle();
    }
}

Name: Anonymous 2010-10-27 11:42


    public static void main(String[] args) {
        new Rectangle();
    }


>>11
Fuck. That's so retarded that I don't even want to tell you what kind of idiot you are.
 
GTFO2RTFM.

Name: Anonymous 2010-10-27 11:51

>>12
My tutor insists on having two classes, in this case it would be Rectangle and RectangleUser

Don't change these.
Name: Email:
Entire Thread Thread List