Re: Swing GUI
RedGrittyBrick wrote:
Where can I found examples for a gui with a big textarea and some
(buttons)
...
Here's a more useful example, ...
I hoped your first example might have begun to make the OP
realize that perhaps they might have gone about asking that
question in a different (and more specific) way.
...just in case I seem too sarcastic :-)
If they did not get the wider message, perhaps you were
not sarcastic enough. ;-)
To the OP. I read your question and was going to post
a code example like RedGrittyBrick, but since I had no
idea what you wanted in this GUI (and to be quite truthful,
I do not care deeply) I did not even bother to do that.
Further, I do not think that finding a few codes examples
as you stated, will progress your own technical problem
much (which, I am guessing, is to build a UI that has a
large text area and a few buttons).
What will help you a great deal more, in the long run,
is to understand how Java GUI's are construced using
*layouts*. For that knowledge, I highly recommend the
layout section of the Java Tutorial.
<http://java.sun.com/docs/books/tutorial/uiswing/layout/>
<http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html>
Note that the 'Examples Index' linked from the top
of the first page linked above, contains dozens
(from memory) of code samples.
One thing I suspect that is not covered well in those
pages, was demonstrated in RGB's second example,
which uses a 'nested layout'. This is what I call putting
a container with one layout (The JPanel that holds the
buttons gets a FlowLayout, by default) into a larger
container with a (usually different) layout.
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via http://www.javakb.com