Pessoal estou começando a programar em Java e preciso muito da ajuda de vcs… gostaria que alguem me enviasse um exemplo de como acessar e navegar(visualizar, deletar, editar , incluir) … vou postar um parte do código… codigo:
void createShell(Display display) throws Exception
{
shell = new Shell(display);
GridLayout layout = new GridLayout();
layout.numColumns = 6;
shell.setLayout(layout);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:bd");
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery("SELECT * FROM Cadastro");
String nome = "";
String telemark = "";
String end = "";
String bairro = "";
String fone = "";
String foneC = "1";
String data1L = "";
String repiq1 = "";
String repiq2 = "";
String repiq3 = "";
String relatL = "";
boolean visita = false;
String datavisita = "";
String relatV = "";
boolean matri = false;
String dataCad = "";
String Ctr = "";
Button adicionar = new Button(shell, SWT.PUSH);
adicionar.setText("Proximo");
adicionar.addListener(SWT.MouseDown, new Listener()
{
public void handleEvent (Event e)
{
<a href="//rs.next">//rs.next</a>();
}
});
Button button;
Label label;
Text text;
label = new Label(shell, SWT.NULL);
label.setText("Telemarketing:");
text = new Text(shell,SWT.BORDER);
text.setText(telemark);
label = new Label(shell, SWT.NULL);
label.setText("Nome:");
text = new Text(shell, SWT.BORDER);
text.setText(nome);
label = new Label(shell, SWT.NULL);
label.setText("End:");
text = new Text(shell, SWT.BORDER);
text.setText(end);
label = new Label(shell, SWT.NULL);
label.setText("Bairro:");
text = new Text(shell, SWT.BORDER);
text.setText(bairro);
label = new Label(shell, SWT.NULL);
label.setText("Telefone_Residencial:");
text = new Text(shell, SWT.BORDER);
text.setText(fone);
label = new Label(shell, SWT.NULL);
label.setText("Telefone_Comercial");
text = new Text(shell, SWT.BORDER);
if (foneC == null || foneC == "")
{
System.out.println("entrou");
foneC = "0";
}
else
{text.setText(foneC);}
label = new Label(shell, SWT.NULL);
label.setText("Data 1 ligação:");
text = new Text(shell, SWT.BORDER);
text.setText(data1L);
label = new Label(shell, SWT.NULL);
label.setText("1 Repique:");
text = new Text(shell, SWT.BORDER);
text.setText(repiq1);
label = new Label(shell, SWT.NULL);
label.setText("2 Repique:");
text = new Text(shell, SWT.BORDER);
text.setText(repiq2);
// label = new Label(shell, SWT.NULL);
// label.setText("3 Repique:");
// text = new Text(shell, SWT.BORDER);
// text.setText(repiq3);
label = new Label(shell, SWT.NULL);
label.setText("Relatório Lig:");
text = new Text(shell, SWT.BORDER);
text.setText(relatL);
label = new Label(shell, SWT.NULL);
label.setText("Visita:");
button = new Button(shell, SWT.CHECK);
button.setSelection(visita);
label = new Label(shell, SWT.NULL);
label.setText("Data da Visita:");
text = new Text(shell, SWT.BORDER);
<a href="//text.setText">//text.setText</a>(datavisita);
label = new Label(shell, SWT.NULL);
label.setText("Relatório Visita:");
text = new Text(shell, SWT.BORDER);
<a href="//text.setText">//text.setText</a>(relatV);
label = new Label(shell, SWT.NULL);
label.setText("Matrícula:");
button = new Button(shell, SWT.CHECK);
button.setSelection(matri);
label = new Label(shell, SWT.NULL);
label.setText("Data do Cadastro:");
text = new Text(shell, SWT.BORDER);
text.setText(dataCad);
label = new Label(shell, SWT.NULL);
label.setText("Ctr:");
text = new Text(shell, SWT.BORDER);
if (Ctr == null || Ctr == "")
{
Ctr = "0";
}
else
{text.setText(Ctr);
}
}
Access - navegação
M
1 Resposta
A
Dê uma olhada em <A HREF="http://www.portaljava.com/home/modules.php?name=Downloads&d_op=viewdownload&cid=29" TARGET="_blank">http://www.portaljava.com/home/modules.php?name=Downloads&d_op=viewdownload&cid=29
Criado 28 de fevereiro de 2003
Ultima resposta 28 de fev. de 2003
Respostas 1
Participantes 2