Discussion:
Jframes and Jbuttons Help needed.
(too old to reply)
Aaron Pereira
2013-04-18 05:50:51 UTC
Permalink
How do you take an action from a previous jbutton and add them together in a text area ?
Daniel Pitts
2013-04-18 16:17:48 UTC
Permalink
Post by Aaron Pereira
How do you take an action from a previous jbutton and add them together in a text area ?
First, what do you mean by "previous jbutton"?

Second, what do you mean by "take an action" and "add [it] in a text
area"? An action is something which happens. A text area is a place
which holds text.

Third, you've only specified one thing (an action from a "previous
jbutton"), but you've asked how to "add them together", implying there
were two things.

Forth, I assume you really mean "JButton" and "JTextArea", as those are
specific and common things in Java. "jbutton" is just wrong and "text
area" is a more general concept.



You need to do *all* of the following to get useful help:

1. If this is for homework, tell us.

2. For homework, post the exact homework question. Copy and paste it if
you can, or transcribe it *exactly*.

For real world problems, tell us your actual end goal. We're not just
programmers, we're engineers.

3. Always try it yourself first. We're not doing your work for you.

4. Show us what you've tried. An SSCCE is preferred (read
http:///sscce.org for more info).

5. Show us exact error messages you receive (copy and paste, don't type
it out).

6. Tell us what you *expected* to happen, but what *actually* happened
instead.

7. Realize that we will not solve homework problems *for* you, but we
will likely *guide* you to solve it yourself. Most of us are past the
point of needing to do homework. It benefits no one if we do it for you.

8. Also realize that we have no obligation to you. We are here because
we want to be. We are not being paid.

Please, post your question again, keeping the guidelines above in mind.
Good luck.
Roedy Green
2013-04-19 19:44:49 UTC
Permalink
On Wed, 17 Apr 2013 22:50:51 -0700 (PDT), Aaron Pereira
Post by Aaron Pereira
How do you take an action from a previous jbutton and add them together in a text area ?
Your terminology is quite puzzling. JButtons simply get pressed. They
don't produce any text you could insert in a JTextArea. You could
insert some boilerplate e.g. "Green button was pressed". with setText
in the JButton handler.


See http://mindprod.com/jgloss/jbutton.html
to learn how to use JButtons.
See http://mindprod.com/jgloss/jframe.html
for how to use JFrames
see http://mindprod.com/jgloss/jtextarea.html
for how to use a JTextArea
--
Roedy Green Canadian Mind Products http://mindprod.com
Computer programming is the best remedy for pain (physical or emotional)
I have encountered. It requires so much concentration there is nothing left
over to pay attention to the pain. They should teach this in AA.
Loading...