Das Objekt data (oder this.dataobject) möchte ich gerne in einer tabêlle anzeigen (swing?). ich habe allerdings noch nie mit tabellen gearbeitet und habe keine ahnung wie ich das machen soll...wäre um hilfe sehr dankbar
_______________________________________________________________________________
_______________________________________________________________________________
Code:
package adressverwaltung;
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
/**
*
Title: </p>
*
Description: </p>
*
Copyright: Copyright (c) 2004</p>
*
Company: </p>
* @author unascribed
* @version 1.0
**/
public class dlgSuchergebnisse extends JDialog {
Datenbank db = new Datenbank();
//dlgSuche suche = new dlgSuche();
private JPanel panel1 = new JPanel();
private XYLayout xYLayout1 = new XYLayout();
Object[][] dataobject = {};
public dlgSuchergebnisse(Frame frame, String title, boolean modal) {
super(frame, title, modal);
try {
jbInit();
pack();
}
catch(Exception ex) {
ex.printStackTrace();
}
}
public dlgSuchergebnisse() {
this(null, "", false);
}
private void jbInit() throws Exception {
panel1.setLayout(xYLayout1);
panel1.setPreferredSize(new Dimension(400, 450));
this.setResizable(false);
this.setTitle(" :: Adressverwaltung | Suchergebnisse");
getContentPane().add(panel1);
}
public void getdata(String Name, String Vorname, String Telefon, String Strasse, String PLZ, String Ort){
try {
Object[][] data = data = db.getdata(0);
this.dataobject = data;
} catch(Exception w){w.printStackTrace();}
}
public void table(){
}
}