All pastes #451536 Raw Edit

Someone

public java v1 · immutable
·published 2007-04-21 16:45 UTC
rendered paste body
	private void criarConteudo() {		// Cria o painel		JPanel painel = new JPanel(new GridBagLayout());		GridBagConstraints c = new GridBagConstraints();				// Cria o editor de texto		texto = new JTextArea(10,20);		JScrollPane scrollTexto = new JScrollPane(texto,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);		scrollTexto.setBorder(BorderFactory.createLoweredBevelBorder());		JPanel painelCodigo = new JPanel(new BorderLayout());		painelCodigo.setBorder(BorderFactory.createTitledBorder("Código"));		painelCodigo.add(scrollTexto);				c.gridx = 0;		c.gridy = 0;		c.ipadx = 200;		c.ipady = 200;		c.weightx = 1.0;		c.weighty = 1.0;		c.fill = GridBagConstraints.BOTH;		c.insets = new Insets(5,5,0,5);		painel.add(painelCodigo,c);				// Cria a tabela da memória		tabelaMemoria = new JTable(new ModeloMemoria(memoria));		JScrollPane tabelaScroll = new JScrollPane(tabelaMemoria);		tabelaMemoria.setPreferredScrollableViewportSize(new Dimension(100, 100));		tabelaScroll.setBorder(BorderFactory.createLoweredBevelBorder());		JPanel painelMemoria = new JPanel(new BorderLayout());		painelMemoria.setBorder(BorderFactory.createTitledBorder("Memória"));		painelMemoria.add(tabelaScroll);		c.ipadx = 100;		c.ipady = 100;		c.gridx = 1;		c.gridy = 0;		c.weightx = 0.0;		c.weighty = 1.0;		c.insets = new Insets(5,0,0,5);		painel.add(painelMemoria,c);				// Cria o output		output = new JTextArea(3,10);		output.setEditable(false);		JScrollPane scrollOutput = new JScrollPane(output,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);		scrollOutput.setBorder(BorderFactory.createLoweredBevelBorder());		JPanel painelOutput = new JPanel(new BorderLayout());		painelOutput.setBorder(BorderFactory.createTitledBorder("Console"));		painelOutput.add(scrollOutput);		c.ipadx = 0;		c.ipady = 100;		c.gridx = 0;		c.gridy = 1;		c.gridwidth = 2;		c.weightx = 0.0;		c.weighty = 0.0;		c.insets = new Insets(0,5,5,5);		painel.add(painelOutput,c);				// Associa o painel ao frame		painel.setOpaque(true);		setContentPane(painel);	}