This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes removeRow() in AbstractTableModel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "removeRow() in AbstractTableModel" Watch "removeRow() in AbstractTableModel" New topic
Author

removeRow() in AbstractTableModel

Jhedzkie Skies
Ranch Hand

Joined: Oct 28, 2009
Posts: 118
I am using another class in populating my table... having AbstractTableModel means no removeRow()...
here's my code...



i called it as actionPerformed on a JPopupMenu...



and it doesnt work...
i got these results...

Exception in thread "AWT-EventQueue-0" java.lang.Error: java.lang.reflect.InvocationTargetException
at org.jdesktop.application.ApplicationAction.actionFailed(ApplicationAction.java:859)
at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:665)
at org.jdesktop.application.ApplicationAction.actionPerformed(ApplicationAction.java:698)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

please help guys.... thanks in advance...
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2204
    
    7
Not really sure what you are doing but here is my standard solution:

Table From Database
 
Consider Paul's rocket mass heater.
 
subject: removeRow() in AbstractTableModel