Ingenieria De Software

Páginas: 10 (2366 palabras) Publicado: 21 de abril de 2012
EVALUACIÓN A DISTANCIA

DISEÑO Y EVALUACION DE BASES DE DATOS

ESTUDIANTE







FACULTAD DE CIENCIAS TECNOLÓGICAS

Bogotá D.C. 12 de noviembre de 2011

EVALUACIÓN A DISTANCIA

DISEÑO Y EVALUACION DE BASES DE DATOS

PROFESOR

MARIO DUSTANO

UNIVERSIDAD SANTO TOMAS

FACULTAD DE CIENCIAS TECNOLÓGICAS

Bogotá D.C. 12 de noviembre de 2011
Tabla de contenido
ACTIVIDAD14
ACTIVIDAD PRACTICA11
BIBLIOGRAFIA21

ACTIVIDADES 1

1) Construir un programa java que utilizando la clase JFileChooser, File, FileFilter , FileReader nos permita leer una archivo texto con extensión (txt) con una interface gráfica (GUI).

2) Este archivo leído debe ser llevado a memoria (Clase StringBuffer) y mediante la clase StringTokenizer obtener las palabras o tokens del mismo.package carlosperdomo;

import java.io.File;
import javax.swing.JFileChooser;

/**
*
*
*/
public class VentanaUno extends java.awt.Frame {

/** Creates new form VentanaUno */
public VentanaUno() {
initComponents();
}

/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code.The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
Campo1 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();

addWindowListener(newjava.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});

jButton1.setText("Abrir");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);}
});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(24, 24, 24)
.addComponent(jButton1))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(126, 126, 126)
.addComponent(Campo1,javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(45, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap().addComponent(Campo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(26, 26, 26)
.addComponent(jButton1)
.addContainerGap(220, Short.MAX_VALUE))
);
add(jPanel1, java.awt.BorderLayout.CENTER);

pack();
}// </editor-fold>//GEN-END:initComponentsprivate void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

JFileChooser fileChooser=new JFileChooser();
int result=fileChooser.showOpenDialog(null);
if(result==JFileChooser.APPROVE_OPTION){
File file=fileChooser.getSelectedFile();
Campo1.setText(String.valueOf(file));
}...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • ingenieria software
  • Ingenieria De Software
  • Ingenieria De Software
  • Ingenieria De Software
  • Ingenieria De Software
  • Ingenieria de software
  • Ingeniería de Software
  • Ingenieria de software

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS