Michael, I can execute it without problems., initialize for PrescriptionTable is executed when it is created (from the menu Display/Prescriptons)
What did you specifiy as Main Class? It should be PrescriptionDisplay Rergards Am 27.06.2019 um 18:20 schrieb mmo...@me.com: > Here it is. > > Best Regards, > > Michael > On Jun 27, 2019, 8:32 AM -0700, Helmut Leininger <h.leinin...@gmx.at>, > wrote: >> >> somewhere in the cloud (Dropbox, ....) or zip it and send me. >> >> >> Am 27.06.2019 um 17:26 schrieb mmo...@me.com: >>> Debugger says different. >>> >>> Where can I upload it? > >>> >>> Best Regards, >>> >>> Michael >>> On Jun 27, 2019, 8:24 AM -0700, Helmut Leininger >>> <h.leinin...@gmx.at>, wrote: >>>> >>>> Michael, >>>> >>>> I am sorry, but I do not believe it. If you have "new NewJFrame()" >>>> somewhere and you execute it, the constructor gets executed, too. >>>> If not, You made an error (not calling new NewJFrame()) >>>> >>>> Upload (or post) the whole program. >>>> >>>> Regards >>>> >>>> Am 27.06.2019 um 17:17 schrieb mmo...@me.com: >>>>> All well in good but the problem is: >>>>> >>>>> initComponents(); is not being executed. >>>>> >>>>> The program goes right to my code bypassing the constructor and >>>>> generated code. >>>>> >>>>> Best Regards, >>>>> >>>>> Michael >>>>> On Jun 26, 2019, 11:50 PM -0700, Helmut Leininger >>>>> <h.leinin...@gmx.at>, wrote: >>>>>> >>>>>> 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.
<<attachment: h_leininger.vcf>>
signature.asc
Description: OpenPGP digital signature