flyclassic22
Technical User
hi, my scenario is like this, please help..
Mine is doing a Database project
I've A JPanel which contains a JTabbedPane,
My JTabbedPane(has JPanel of Find/addUpdate/delete/(contain all the JTextField so that when record is a found, it is displayed in the JTextField)
And Also /View All Records/ )
I've following classes:
AddRecord.java
Application1.java(main)
ClearFields.java(for clear button in jtextfield)
DeleteRecord.java
FindRecord.java
UpdateRecord.java
DisplayAllTable.java(for View All Records Section)
Frame1.java(All my interfaces, JTextFields, JTabbedPane , JPanel, JButton, JTable etc..).
I've succesfully done the FIND/ADD/UPDATE/DELETE
Part. But i've
problems in my View ALL RECORDS Section:
I can't seems to Pass values to the JTable in (View ALL Section) to display all the database records in Table Form.
I've the correct scripting but i can't update the JTable.
Anyone could help.? in DisplayAllTable.java
i've passed Frame1.java 's Jtable, JPanel, into my DisplayALLTable.java so that i could use them to update my table with my following code:
(in DisplayAllTable.java)
jtableA = new JTable( rows, columnHeads ); (rows , columnHeads has all the values of the database)
//System.out.Println("" +rows +"" +columnHeads)
JScrollPane scroller = new JScrollPane( jtableA );
view_all.remove(1);
view_all.add(jPanel15, BorderLayout.NORTH);
view_all.validate();
jPanel15.remove(1);
jPanel15.validate();
jPanel15.add(scroller, null);
jTabbedPane1.add(view_all, "View All Records"
contentPane.add(jTabbedPane1, BorderLayout.CENTER);
Compilation Has no error, but it just that i can't update the JTable in Frame1.java. But if i put a println to print the rows and columnHeads of the records found, it was able to print, only how do i call to update the table.?
SOrry about my lengthy explaination, not sure if you guys understand, if do, please help me. coz i'm left with this part..
if you need any screenshot or the source to help me please let me know...
Desperate.
email:flydx_007@msn.com
icq:1360829
msn:flydx_007@msn.com
Mine is doing a Database project
I've A JPanel which contains a JTabbedPane,
My JTabbedPane(has JPanel of Find/addUpdate/delete/(contain all the JTextField so that when record is a found, it is displayed in the JTextField)
And Also /View All Records/ )
I've following classes:
AddRecord.java
Application1.java(main)
ClearFields.java(for clear button in jtextfield)
DeleteRecord.java
FindRecord.java
UpdateRecord.java
DisplayAllTable.java(for View All Records Section)
Frame1.java(All my interfaces, JTextFields, JTabbedPane , JPanel, JButton, JTable etc..).
I've succesfully done the FIND/ADD/UPDATE/DELETE
Part. But i've
problems in my View ALL RECORDS Section:
I can't seems to Pass values to the JTable in (View ALL Section) to display all the database records in Table Form.
I've the correct scripting but i can't update the JTable.
Anyone could help.? in DisplayAllTable.java
i've passed Frame1.java 's Jtable, JPanel, into my DisplayALLTable.java so that i could use them to update my table with my following code:
(in DisplayAllTable.java)
jtableA = new JTable( rows, columnHeads ); (rows , columnHeads has all the values of the database)
//System.out.Println("" +rows +"" +columnHeads)
JScrollPane scroller = new JScrollPane( jtableA );
view_all.remove(1);
view_all.add(jPanel15, BorderLayout.NORTH);
view_all.validate();
jPanel15.remove(1);
jPanel15.validate();
jPanel15.add(scroller, null);
jTabbedPane1.add(view_all, "View All Records"
contentPane.add(jTabbedPane1, BorderLayout.CENTER);
Compilation Has no error, but it just that i can't update the JTable in Frame1.java. But if i put a println to print the rows and columnHeads of the records found, it was able to print, only how do i call to update the table.?
SOrry about my lengthy explaination, not sure if you guys understand, if do, please help me. coz i'm left with this part..
if you need any screenshot or the source to help me please let me know...
Desperate.
email:flydx_007@msn.com
icq:1360829
msn:flydx_007@msn.com