Re: Swing GUI



lando wrote:
Where can I found examples for a gui with a big textarea and some buttons ?
Thanks.

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;

public class ABigTextAreaAndSOmeButtons {
// constructor
ABigTextAreaAndSOmeButtons() {
JPanel p = new JPanel();
p.add(new JTextArea(40,80));
p.add(new JButton("This"));
p.add(new JButton("That"));
p.add(new JButton("Other"));

JFrame f = new JFrame("A big text area with some buttons");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add(p);
f.pack();
f.setVisible(true);
}

public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new ABigTextAreaAndSOmeButtons();
}
});
}
}
.