Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how run tim data in jtable or show data in jtable from my database table

muhammad fahim
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir i use DefaultTableModel. or swing jtable some body give me idea i use dumy class and use getColumnClass() and isCellEditable() class for modify the swing defult jtable or swing jtable give class because swing jtable give me defult data that read only but i want show data in jtable form my database table i change the title of table form give propery bu i have lot of row

how i run time or dynamicly give data to jtable form my database table in jtable

such as my table have data this type

sname sno class address marks
fahim 34 4 xxxx 545
aamir 43 4 ljfd 55
kashif 33 5 gd 444

and swing defult jtable give me this type data

private String[] columnNames = {"First Name",
"Last Name",
"# of Years",
private Object[][] data = {
{"Mary", "Campione",
"Snowboarding", new Integer(5), new Boolean(false)},
{"Alison", "Huml",
"Rowing", new Integer(3), new Boolean(true)},
{"Kathy", "Walrath",
"Knitting", new Integer(2), new Boolean(false)},
{"Sharon", "Zakhour",
"Speed reading", new Integer(20), new Boolean(true)},
{"Philip", "Milne",
"Pool", new Integer(10), new Boolean(false)}

or null data

sir please give me ida how i show my database table data in jtable

and how i set the jpanel location such as setlocation(12,14,3,5) but this code not give me right result please give right code


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic