where the writers are
Subject to Revision

My new catchphrase is "I'm not going to panic until x".

 

Keywords:
Comments
14 Comment count
Comment Bubble Tip

Okay...

We won't send you a x :)

 

And time yet for a hundred indecisions,

And for a hundred visions and revisions,

Before the taking of a toast and tea.'

 

As Mr Prufrock observed.

 

Comment Bubble Tip

On a more pensive note...

That's good advice, so best not to admit the concept of 'revision' or it will be undercut.

If you refuse to panic until the algebraic x, you'll have the adrenalin for its proper purpose, carrying you through.

I will show you fear in a handful of dust.

A quote you'll recognise from the same poet as the aforementioned. (I have yet to discover a greater than Eliot.)

Comment Bubble Tip

I figure

I can just keep changing the value of x and never panic.

I don't know about Eliot. I mean, if you have to introduce your work by quoting some other writer, how good can you be?  Dickinson now is a poet that can stand on her own :)

 

Comment Bubble Tip

Then I guess, after all...

You don't need to reference Emerson quite so enthusiastically in your latest...  :)

Comment Bubble Tip

Emerson

who? :)

Comment Bubble Tip

Wrong reply...

The answer is 'Touché!'

Comment Bubble Tip

According to this Java source

According to this Java source code, you aren't out of the woods yet.

 

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

 

 

 

/** Demonstrate GUI building with multiple panels and event handling. **/

public class MultiPanelWithEvents extends JApplet

              implements ActionListener {

 

public static void main(String[]args) {

 

 

 

}

 

 InputsPanel fInputsPanel;

  JTextArea fTextOutput;

 

 

 

  /** Build the interface with InputsPanel and ActionButtonsPanel. **/

  public void init () {

    Container content_pane = getContentPane ();

 

    // Set the layout as before with 1 row of 3 columns

    // but now in one step.

    content_pane.setLayout (new GridLayout (1, 3));

 

    // First create a panel of buttons

    ActionButtonsPanel buttons_panel =

        new ActionButtonsPanel (this);

 

    // Next create a panel of input fields and labels

    fInputsPanel =

        new InputsPanel ("Input x ", "1.5",

                         "Input y ", "3.14");

 

    // Use a JTextArea for the output of the calculations.

    fTextOutput = new JTextArea ();

    fTextOutput.setBackground (Color.LIGHT_GRAY);

    fTextOutput.setEditable (false);

 

    // The grid fills the 3 columns sequentially.

    content_pane.add (buttons_panel);

    content_pane.add (fInputsPanel);

    content_pane.add (fTextOutput);

 

  } // init

 

  /** Handle the button events.**/

  public void actionPerformed (ActionEvent ae) {

 

    String str1 = fInputsPanel.fTextfieldTop.getText ();

    String str2 = fInputsPanel.fTextfieldBot.getText ();

 

    double val1=0.0;

    double val2=0.0;

 

    try {

      val1 = Double.parseDouble (str1);

      val2 = Double.parseDouble (str2);

    } catch  (NumberFormatException nfe){

      System.out.println ("Improper input");

    }

 

    if (ae.getActionCommand ().equals ("Add") ){

        fTextOutput.setText ("x + y = " +  (val1+val2));

    } else {

        fTextOutput.setText ("x * y = " +  (val1*val2));

    }

  } // actionPerformed

 

} // class MultiPanelWithEvents

 

Comment Bubble Tip

According to this Java source

According to this Java source code, you aren't out of the woods yet.

 

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

 

 

 

/** Demonstrate GUI building with multiple panels and event handling. **/

public class MultiPanelWithEvents extends JApplet

              implements ActionListener {

 

public static void main(String[]args) {

 

 

 

}

 

 InputsPanel fInputsPanel;

  JTextArea fTextOutput;

 

 

 

  /** Build the interface with InputsPanel and ActionButtonsPanel. **/

  public void init () {

    Container content_pane = getContentPane ();

 

    // Set the layout as before with 1 row of 3 columns

    // but now in one step.

    content_pane.setLayout (new GridLayout (1, 3));

 

    // First create a panel of buttons

    ActionButtonsPanel buttons_panel =

        new ActionButtonsPanel (this);

 

    // Next create a panel of input fields and labels

    fInputsPanel =

        new InputsPanel ("Input x ", "1.5",

                         "Input y ", "3.14");

 

    // Use a JTextArea for the output of the calculations.

    fTextOutput = new JTextArea ();

    fTextOutput.setBackground (Color.LIGHT_GRAY);

    fTextOutput.setEditable (false);

 

    // The grid fills the 3 columns sequentially.

    content_pane.add (buttons_panel);

    content_pane.add (fInputsPanel);

    content_pane.add (fTextOutput);

 

  } // init

 

  /** Handle the button events.**/

  public void actionPerformed (ActionEvent ae) {

 

    String str1 = fInputsPanel.fTextfieldTop.getText ();

    String str2 = fInputsPanel.fTextfieldBot.getText ();

 

    double val1=0.0;

    double val2=0.0;

 

    try {

      val1 = Double.parseDouble (str1);

      val2 = Double.parseDouble (str2);

    } catch  (NumberFormatException nfe){

      System.out.println ("Improper input");

    }

 

    if (ae.getActionCommand ().equals ("Add") ){

        fTextOutput.setText ("x + y = " +  (val1+val2));

    } else {

        fTextOutput.setText ("x * y = " +  (val1*val2));

    }

  } // actionPerformed

 

} // class MultiPanelWithEvents

 

Comment Bubble Tip

So

If I run this code, can I get rid of my xanax?

Comment Bubble Tip

No doubt about it!  

No doubt about it!   Guarenteed free of side effects!

Comment Bubble Tip

I'm with Dorothy Parker on this..

'I'd rather have a bottle in front of me than a frontal lobotomy.'

Comment Bubble Tip

Remlinds me of a job

Remlinds me of a job application I once encuntered.  There was a question on it: "Have you ever suffered from mental illness?"

I wrote, "No, I've always thoroughly enjoyed it."

I can't remember if I got the job or not. :)

Eric

Comment Bubble Tip

So we don't know whether...

that was a class MultiPanelWithEvents, or not.

Comment Bubble Tip

Great Answer

I'm job-hunting now - have to remember that!