Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scherm1
- ----------------------------------------------------------------------------------------------------------
- private void infoButtonActionPerformed(java.awt.event.ActionEvent evt) {
- String Selectie = list.getSelectedValue().toString();
- String[] naam = Selectie.split(" ");
- String voornaam = naam[0];
- String achternaam = naam[1];
- Infoscherm info = new Infoscherm(voornaam, achternaam, infoscherm);
- info.setVisible(true);
- try {
- Connection con = Week4.getConnection();
- Statement stmt = con.createStatement();
- String SQL = "SELECT * FROM lid WHERE naam = '"+voornaam+"', '"+achternaam+"'";
- ResultSet result = stmt.executeQuery(SQL);
- result.next();
- info.projectnaamVeld.setText(result.getString(1));
- info.startdatumVeld.setText(result.getString(2));
- info.einddatumVeld.setText(result.getString(3));
- info.leiderVeld.setText(result.getString(4));
- //info.lidVeld.setListData(result.getString(5));
- //info.lidVeld.setText(result.getString(5));
- info.inexVeld.setText(result.getString(6));
- info.typeVeld.setText(result.getString(7));
- info.omschrijvingVeld.setText(result.getString(8));
- } catch (SQLException err) {
- System.out.println(err.getMessage());
- }
- list.setListData(projecten.toArray());
- }
- scherm 2
- -----------------------------------------------------------------------------------------------------------
- public class Infoscherm extends javax.swing.JFrame {
- public String voornaam;
- public String achternaam;
- public Infoscherm info;
- public Infoscherm(String voornaam, String achternaam, Infoscherm infoscherm) {
- initComponents();
- this.voornaam = voornaam;
- this.achternaam = achternaam;
- this.info = info;
- }
- public Infoscherm() {
- initComponents();
- ButtonGroup inex = new ButtonGroup();
- inex.add(internRadio);
- inex.add(externRadio);
- ButtonGroup type = new ButtonGroup();
- type.add(cRadio);
- type.add(javaRadio);
- type.add(phpRadio);
- }
Advertisement
Add Comment
Please, Sign In to add comment