Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/07/2008, 19:26
Lindberg
 
Fecha de Ingreso: abril-2006
Ubicación: Recife - Brasil
Mensajes: 23
Antigüedad: 18 años, 9 meses
Puntos: 0
Respuesta: Problemas con las interfaces graficas y los eventos en Java

se voce estiver desenvolvendo em jsp.

da uma olhada ai:

http://www.guj.com.br/posts/list/80821.java#429635



se voce estiver desenvolvendo para desktop
veja o exemplo:

/**
*
* @author Lindberg
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.Box;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

public class frcf01 extends javax.swing.JFrame {

// variavel para digitar os dados / mostrar os dados
JTextArea areaTexto;


public frcf01() {
initComponents();
}




private void initComponents() {

jPanel1 = new javax.swing.JPanel();
Incluir = new javax.swing.JButton();

..............
...................

areaTexto = new JTextArea(10, 17);
JScrollPane jd = new JScrollPane(areaTexto);
jd.setVerticalScrollBarPolicy(JScrollPane.VERTICAL _SCROLLBAR_ALWAYS);
jd.setHorizontalScrollBarPolicy(JScrollPane.HORIZO NTAL_SCROLLBAR_ALWAYS);

getContentPane().add(jd);
jd.setBounds(320, 30, 210, 219);

...............
........... // cria na tabela do banco de dados um campo Obs tipo text - (Mysql)
update, insert ....
+ " , Obs = '" + areaTexto.getText() + "'"

..................
...............
areaTexto.setText( "dados dados dadso" );

Espero ter ajudado

Última edición por Lindberg; 22/07/2008 a las 19:46