Michael, I assume you have created your GUI by New JFrame Form", right? At least, I hope so.
if you look at main() you will find something like: new NewJFrame() ... NewJFrame ist the name you have given during the creation of your class / form. This creates the form and first executes its Constructor (public NewJFrame()). In this constructor, the first is the call for initialize() (which does all initialization and creation of the objects). If you want to add your personal initializations, you would have to do this after initialize(), probably in the same Constructor. If you are not sure about how to create GUI with or without Netbeans, you will find several tutorials / videos in the Internet. Regards Helmut Am 26.06.2019 um 21:21 schrieb mmo...@me.com: > Thanks Helmut, > > I did use the debugger, first time for everything, and I found the > initcomponents() is not being executed. I am under the impression that > it is handled by NetBeans. > > I call the class: > > displays.PresciptionTable scripts = new displays.PrescriptionTable(); > > Best Regards, > > Michael > On Jun 26, 2019, 12:02 PM -0700, Helmut Leininger <hl...@gmx.at>, wrote: >> Michael, >> I strongly recommend to use the debugger. This will most probably be >> the most efficient method to locate tje problem. >> >> - set a breakpoint on the line causing the ecception >> - run the program with Debug >> - when the program stops at the breakpoint inspect the variables >> >> As alternative you would have to print out every variable or uplpad >> the whole program. >> >> Regards >> Helmut >> >> Am 26. Juni 2019 20:15:00 MESZ schrieb mmo...@me.com: >> >>> did you initzialize num and row ? >>> >>> Yes I tried both 0 & 1. I used System.out.println(num) and it >>> contains data. >>> >>> scriptTable.setModel(new javax.swing.table.DefaultTableModel( >>> >>> new Object [][] { >>> >>> {null, null, null, null, null, null, null, null}, >>> >>> {null, null, null, null, null, null, null, null}, >>> >>> {null, null, null, null, null, null, null, null}, >>> >>> {null, null, null, null, null, null, null, null} >>> >>> } >>> >>> Same problem and this code is generated by NetBeans >>> >> >> Best Regards, >> >> Michael >> On Jun 26, 2019, 11:02 AM -0700, Helmut Leininger >> <h.leinin...@gmx.at>, wrote: >>> >>> Once again: >>> >>> did you initzialize num and row ? >>> >>> When I design your example, I get: >>> >>> ... >>> scriptTable.setModel(new javax.swing.table.DefaultTableModel( >>> new Object [][] { >>> {null, null, null, null}, >>> {null, null, null, null}, >>> {null, null, null, null}, >>> {null, null, null, null} >>> }, >>> new String [] { >>> "Title 1", "Title 2", "Title 3", "Title 4" >>> } >>> )); >>> ... >>> >>> Where are your nulls for new Object[][] ? >>> >>> >>> Helmut >>> >>> Am 26.06.2019 um 19:45 schrieb mmo...@me.com.INVALID: >>>> scriptTable.getModel().setValueAt(num, row, 2) >> >> >> -- >> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
signature.asc
Description: OpenPGP digital signature