[Swing - A Litle Fast Help]

1 resposta
eduardo_jreis
Pra começar, eis meu código:
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);
		
	}
	
}

eis o resultado obtido:
[img]http://img835.imageshack.us/img835/2650/ideia.jpg[/img]

Alguem pode dizer onde estao os erros?

1 Resposta

eduardo_jreis

alguma sugestao?

Criado 11 de setembro de 2010
Ultima resposta 11 de set. de 2010
Respostas 1
Participantes 1