Pra começar, eis meu código:
[code]
package GUI;
import java.awt.Dimension;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
public class GUI extends JFrame{
Box box, R, L;
private JScrollPane paneR, paneL;
private JTextArea linksR, linksL;
private JButton button;
private JLabel labelR, labelL;
public GUI(){
super("Link Xtractor 2.0 by E.J.");
box = Box.createHorizontalBox();
R = Box.createVerticalBox();
L = Box.createVerticalBox();
labelL = new JLabel("Links entrada:");
labelR = new JLabel("Links saida:");
linksR = new JTextArea(null,5,24);
linksL = new JTextArea(null,5,24);
button = new JButton("Gerar Saida");
button.setSize(new Dimension(50, 50));
paneR = new JScrollPane(linksR);
paneR.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
paneR.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
paneR.add(linksR);
paneL = new JScrollPane(linksL);
paneL.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
paneL.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
paneL.add(linksL);
L.add(labelL);
L.add(paneL);
R.add(labelR);
R.add(paneR);
box.add(L);
box.add(button);
box.add(R);
add(box);
this.setSize(600, 400);
this.setVisible(true);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
}
}
[/code]
eis o resultado obtido:
Alguem pode dizer onde estao os erros?