Re: JTable - Null Pointer - GUI editor

2019-06-26 Thread Helmut Leininger
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 , 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
>> , 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


Re: Reserved keywords for SQL files

2019-06-26 Thread Pete Whelpton
Sorry, yes that's a source file. I believe the keyword list is hard coded
(I looked for this before!), and based on an older ISO standard - which
makes sense rather than adding in Pl/SQl, T-SQL extensions etc.

It would be quick to update the list for a newer standard. I don't know
enough about the legalities of it though - would it be necessary to have
purchased a copy of the ISO standard in order that have the keyword list
based on it?

For personal use though, you could update that class yourself and compile
from source??


Hope that helps,


P

On Wed, 26 Jun 2019, 23:40 Greenberg, Gary,  wrote:

> There is no such file in the netbeans binary distro.
>
> I haven’t compile it from source, though.
>
>
>
> Gary Greenberg
>
> Staff Software Engineer
>
> Data Product Development, BI-A
>
> E: ggree...@visa.com
>
> M: 650-269-7902
>
>
>
> [image: EmailSig-TaglineVersion]
>
>
>
> *From:* Pete Whelpton 
> *Sent:* Wednesday, June 26, 2019 3:29 PM
> *To:* Greenberg, Gary 
> *Cc:* NetBeans Mailing List 
> *Subject:* Re: Reserved keywords for SQL files
>
>
>
> netbeans/ide/dbapi/src/org/netbeans/modules/db/api/sql/SQLKeywords.java I
> think..
>
>
>
> On Wed, 26 Jun 2019, 23:11 Greenberg, Gary,  wrote:
>
> I am working with SQL scripts in the NB 11 right now and noticed that good
> portion of keywords in it are marked in blue colors, while tables and
> column names, as well as values displayed in green. That is very convenient
> and allows to catch some misspelling right away.
>
> However some of the keywords are not displayed in blue color. For example
> keyword *comment* or datatypes *bigint* or *datetime*.
>
> I understand that SQL dialects are different for different engines, but is
> it possible to amend the list of keywords to include those?
>
> Thanks,
>
>
>
> Gary Greenberg
>
> Staff Software Engineer
>
> Data Product Development, BI-A
>
> E: ggree...@visa.com
>
> M: 650-269-7902
>
>
>
> [image: EmailSig-TaglineVersion]
>
>
>
>


RE: Reserved keywords for SQL files

2019-06-26 Thread Greenberg, Gary
There is no such file in the netbeans binary distro.
I haven’t compile it from source, though.

Gary Greenberg
Staff Software Engineer
Data Product Development, BI-A
E: ggree...@visa.com
M: 650-269-7902

[EmailSig-TaglineVersion]

From: Pete Whelpton 
Sent: Wednesday, June 26, 2019 3:29 PM
To: Greenberg, Gary 
Cc: NetBeans Mailing List 
Subject: Re: Reserved keywords for SQL files

netbeans/ide/dbapi/src/org/netbeans/modules/db/api/sql/SQLKeywords.java I 
think..

On Wed, 26 Jun 2019, 23:11 Greenberg, Gary, 
mailto:ggree...@visa.com>> wrote:
I am working with SQL scripts in the NB 11 right now and noticed that good 
portion of keywords in it are marked in blue colors, while tables and column 
names, as well as values displayed in green. That is very convenient and allows 
to catch some misspelling right away.
However some of the keywords are not displayed in blue color. For example 
keyword comment or datatypes bigint or datetime.
I understand that SQL dialects are different for different engines, but is it 
possible to amend the list of keywords to include those?
Thanks,

Gary Greenberg
Staff Software Engineer
Data Product Development, BI-A
E: ggree...@visa.com
M: 650-269-7902

[EmailSig-TaglineVersion]



Re: Reserved keywords for SQL files

2019-06-26 Thread Pete Whelpton
netbeans/ide/dbapi/src/org/netbeans/modules/db/api/sql/SQLKeywords.java I
think..

On Wed, 26 Jun 2019, 23:11 Greenberg, Gary,  wrote:

> I am working with SQL scripts in the NB 11 right now and noticed that good
> portion of keywords in it are marked in blue colors, while tables and
> column names, as well as values displayed in green. That is very convenient
> and allows to catch some misspelling right away.
>
> However some of the keywords are not displayed in blue color. For example
> keyword *comment* or datatypes *bigint* or *datetime*.
>
> I understand that SQL dialects are different for different engines, but is
> it possible to amend the list of keywords to include those?
>
> Thanks,
>
>
>
> Gary Greenberg
>
> Staff Software Engineer
>
> Data Product Development, BI-A
>
> E: ggree...@visa.com
>
> M: 650-269-7902
>
>
>
> [image: EmailSig-TaglineVersion]
>
>
>

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reserved keywords for SQL files

2019-06-26 Thread Greenberg, Gary
I am working with SQL scripts in the NB 11 right now and noticed that good 
portion of keywords in it are marked in blue colors, while tables and column 
names, as well as values displayed in green. That is very convenient and allows 
to catch some misspelling right away.
However some of the keywords are not displayed in blue color. For example 
keyword comment or datatypes bigint or datetime.
I understand that SQL dialects are different for different engines, but is it 
possible to amend the list of keywords to include those?
Thanks,

Gary Greenberg
Staff Software Engineer
Data Product Development, BI-A
E: ggree...@visa.com
M: 650-269-7902

[EmailSig-TaglineVersion]



Re: JTable - Null Pointer - GUI editor

2019-06-26 Thread Bayless
The code you show does not populate the data vector so it has no rows 
unless you just haven't shown where you do that. You can't set a value 
in a row that does not exist, thus null probably. Also num or row could 
be null. Finally, your column numbers in the setValueAt lines do not 
agree with your defined columns.


Anyway as someone suggested earlier, Set a breakpoint at the offending 
line and find out what is null. If that doesn't show it then precede 
with get the data vector from the model and check it.


Bayless


On 6/26/19 12:45 PM, mmo...@me.com wrote:

This is the generated code:

private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        scriptTable = new javax.swing.JTable();

        setSize(new java.awt.Dimension(200, 200));

        scriptTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Number", "Name", "Dose", "Instructions", "Date 
Filled", "Date to Refill", "Date to Renew", "Date Expires”

            }
        ));
jScrollPane1.setViewportView(scriptTable);

This is my code where I use it:

  scriptTable.getModel().setValueAt(num, row, 2);  NULL POINTER HERE
scriptTable.getModel().setValueAt(nam, row, 3);
scriptTable.getModel().setValueAt(dose, row, 4);
scriptTable.getModel().setValueAt(instruc, row, 5);
scriptTable.getModel().setValueAt(filled, row, 6);
scriptTable.getModel().setValueAt(tofill, row, 7);
scriptTable.getModel().setValueAt(torenew, row, 8);
scriptTable.getModel().setValueAt(expires, row, 9);

Best Regards,

Michael
On Jun 26, 2019, 4:33 AM -0700, Bayless , wrote:


Or maybe you have not created the model or supplied it with starting 
data vector.


Bayless


On 6/26/19 12:42 AM, Helmut Leininger wrote:


Hi Michael,

without more information it is very difficult to say. It could be 
that either scriptTable, num, or row is not set.


I would try to use the debugger to find out.

Helmut

Am 26.06.2019 um 01:20 schrieb mmo...@me.com.INVALID:
I placed a JTable, on a JScrollPane on a JInternalFrame, using the 
default DefaultTableModel.


When I try and load data into the model I get a 
java.lang.NullPointerException.


scriptTable.setValueAt(num, row, 2);

The table is initialized in the constructor method InitComponents.

Any idea what I’m doing wrong?

Best Regards,

Michael


Re: Apache NetBeans 11.1-beta2 Is Available for Testing!

2019-06-26 Thread Geertjan Wielenga
Excellent, great work!

Especially the Java EE 8 integration (Maven only, Gradle would be excellent
too), and Payara integration would be great for us all to take a look at
here.

Gj


On Wed, 26 Jun 2019 at 20:27, Neil C Smith  wrote:

> Dear Community,
>
> I'd like to announce that the second beta build for Apache NetBeans
> 11.1 from the release111 branch is available for download.
>
> Key changes since beta1 include integration of Java EE 8 and Payara
> support via agreed feature freeze bypass - testing in these areas
> would be very appreciated.  Full details of changes between beta1 and
> beta2 are at https://github.com/apache/netbeans/pull/1330
>
>
> As this build is for testing purposes only, we are not going to do the
> release dance and voting around it (and as we're not voting on it, the
> files are tagged beta not vc!).
>
> As per the recently agreed release schedule, NB 11.1 is a non-LTS
> release, and will not have a full NetCAT process.  However, feedback
> and testing from those on the dev@ and netcat@ lists would still be
> appreciated, particularly around new features.  Please file issues in
> JIRA as necessary, with the affects and fix versions set to 11.1.
>
> Another beta will be released, as required, on July ~3rd.  The final
> NB 11.1 release is scheduled for July ~15th.
>
> The next full NetCAT is scheduled for NB 12.0 in early 2020, which
> will be the next LTS release.
>
> Release schedule :
> https://cwiki.apache.org/confluence/display/NETBEANS/Release+Schedule
> NB 11.1 major changes :
> https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+11.1
>
>
> See the artefacts here:
> https://builds.apache.org/job/netbeans-release/417/artifact/dist/
>
> The binary you most likely need is:
>
> https://builds.apache.org/job/netbeans-release/417/artifact/dist/netbeans-11.1-beta2-bin.zip
>
> Installers, as mentioned in the major changes link, are in progress.
>
> The SHA512 sums if you would like to check them are provided there as
> well as here:
>
>
> 19470a7c60bc58d1aeedf66ec1e4fc96aef2fd20c75218a943acd4f6c604bf2bfcf669b932651b1900ffab787589fae92838e068158fe963692ee00c109dd2e8
>  ./netbeans-11.1-beta2-bin.zip
>
> b3e7471237485d2b28a5673988a093d32f881d98004f674035e7adb0d4b5461f6a3d7277a1f82a04be445d6ecacc6dceed0ff489ce3418ae50b9f197fa69cb20
>  ./netbeans-11.1-beta2-source.zip
>
> 6d8819171d2795f877ac66f8689fe55c64d095293ae8c106f8f28207282e263b4d4d69375c6024640ae3173dad898e7117f3cb1a38c2400ceae04e2fdc5f99a4
>  ./netbeans-platform-11.1-beta2-bin.zip
>
> f69ebbfbf0129e3cb650046f3887d23a299aa7625367414be400727c3b8386bc5322dffc043e930cc4c9b39c1febb60c2d11b48f1b622bc291cecec0acfdac92
>  ./netbeans-platform-11.1-beta2-source.zip
>
>
> Thanks and best wishes,
>
> Neil
>
> Voluntary Release Manager for Apache NetBeans 11.1
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: dev-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>


Re: JTable - Null Pointer - GUI editor

2019-06-26 Thread Helmut Leininger
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)
<>

signature.asc
Description: OpenPGP digital signature


Re: JTable - Null Pointer - GUI editor

2019-06-26 Thread mmouer
This is the generated code:

private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        scriptTable = new javax.swing.JTable();

        setSize(new java.awt.Dimension(200, 200));

        scriptTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Number", "Name", "Dose", "Instructions", "Date Filled", "Date 
to Refill", "Date to Renew", "Date Expires”
            }
        ));
        jScrollPane1.setViewportView(scriptTable);

This is my code where I use it:

  scriptTable.getModel().setValueAt(num, row, 2);  NULL POINTER HERE
                    scriptTable.getModel().setValueAt(nam, row, 3);
                    scriptTable.getModel().setValueAt(dose, row, 4);
                    scriptTable.getModel().setValueAt(instruc, row, 5);
                    scriptTable.getModel().setValueAt(filled, row, 6);
                    scriptTable.getModel().setValueAt(tofill, row, 7);
                    scriptTable.getModel().setValueAt(torenew, row, 8);
                    scriptTable.getModel().setValueAt(expires, row, 9);

Best Regards,

Michael
On Jun 26, 2019, 4:33 AM -0700, Bayless , wrote:
> Or maybe you have not created the model or supplied it with starting data 
> vector.
> Bayless
>
> On 6/26/19 12:42 AM, Helmut Leininger wrote:
> > Hi Michael,
> > without more information it is very difficult to say. It could be that 
> > either scriptTable, num, or row is not set.
> > I would try to use the debugger to find out.
> > Helmut
> > Am 26.06.2019 um 01:20 schrieb mmo...@me.com.INVALID:
> > > I placed a JTable, on a JScrollPane on a JInternalFrame, using the 
> > > default DefaultTableModel.
> > >
> > > When I try and load data into the model I get a 
> > > java.lang.NullPointerException.
> > >
> > > scriptTable.setValueAt(num, row, 2);
> > >
> > > The table is initialized in the constructor method InitComponents.
> > >
> > > Any idea what I’m doing wrong?
> > >
> > > Best Regards,
> > >
> > > Michael


[java] Navigate Go To Source Not Working as Expected

2019-06-26 Thread Arslanian, Jared A.
When trying to use maven version ranges for inter project dependencies,
NetBeans seemingly changes how the Navigate Go To Source or simply the
CTRL-Click works.  I am used to the nice capability to quickly CTRL-click
and jump to the source file that is already open within the same netbeans
instance.  Instead with ranges it seemingly go to the maven repository and
shows the autogenerated sources giving the download sources button instead
of opening the source file that is already loaded.



Is this a bug?  Is there a way to configure NetBeans when using a version
range for project dependencies that it will still look in the opened
projects first before attempting to look into the maven repository?

 



smime.p7s
Description: S/MIME cryptographic signature


Re: Swing in Netbeans

2019-06-26 Thread Peter Toye
Dear Geertjan,

Thanks. It's just that (as I reported in a previous post) I had problems 
opening my old project in NB 11. I then created a library called swing-layout 
but didn't give it a classpath - now the project compiles OK even with the 
missing classpath (not sure how - should it have one?) so I seem to be OK.

But I thought I'd try starting afresh and couldn't find the old New Project - 
Java. Now I realise I have to select Java with Ant.

Sorry for the trouble - getting too old for this sort of thing.

Best regards,

Peter
mailto:netbe...@ptoye.com
www.ptoye.com

-
Wednesday, June 26, 2019, 4:01:30 PM, you wrote:


You’re going to need to define what “Swing projects” are. Swing is supported 
out of the box, NetBeans Platform applications too, which are Swing projects, 
too.

Gj

On Wed, 26 Jun 2019 at 16:59, Peter Toye  wrote:

Having recently decided to modify an ancient Java program I installed NB 
version 11, but there doesn't seem to be any support for Swing projects in it. 
Do I have to convert to JavaFX (which I'd first have to learn)? Or is it easier 
just to continue with Netbeans version 8?

Thanks in advance,
 
Peter
mailto:netbe...@ptoye.com
www.ptoye.com

Re: Swing in Netbeans

2019-06-26 Thread Glenn Holmer
On 6/26/19 9:59 AM, Peter Toye wrote:
> Having recently decided to modify an ancient Java program I installed NB
> version 11, but there doesn't seem to be any support for Swing projects
> in it. Do I have to convert to JavaFX (which I'd first have to learn)?
> Or is it easier just to continue with Netbeans version 8?

Swing's supported, I've been working on a Swing project with NB 11.
Maybe the ancients were using a technology besides Swing that's no
longer supported or needs to be set up differently. Are you getting any
interesting error messages?

-- 
Glenn Holmer (Linux registered user #16682)
"After the vintage season came the aftermath -- and Cenbe."
<>
-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Re: Swing in Netbeans

2019-06-26 Thread Geertjan Wielenga
You’re going to need to define what “Swing projects” are. Swing is
supported out of the box, NetBeans Platform applications too, which are
Swing projects, too.

Gj

On Wed, 26 Jun 2019 at 16:59, Peter Toye  wrote:

> Having recently decided to modify an ancient Java program I installed NB
> version 11, but there doesn't seem to be any support for Swing projects in
> it. Do I have to convert to JavaFX (which I'd first have to learn)? Or is
> it easier just to continue with Netbeans version 8?
>
> Thanks in advance,
>
> Peter
> mailto:netbe...@ptoye.com 
> www.ptoye.com
>


Swing in Netbeans

2019-06-26 Thread Peter Toye
Having recently decided to modify an ancient Java program I installed NB 
version 11, but there doesn't seem to be any support for Swing projects in it. 
Do I have to convert to JavaFX (which I'd first have to learn)? Or is it easier 
just to continue with Netbeans version 8?

Thanks in advance,
 
Peter
mailto:netbe...@ptoye.com
www.ptoye.com

Re: JTable - Null Pointer - GUI editor

2019-06-26 Thread Bayless
Or maybe you have not created the model or supplied it with starting 
data vector.


Bayless


On 6/26/19 12:42 AM, Helmut Leininger wrote:


Hi Michael,

without more information it is very difficult to say. It could be that 
either scriptTable, num, or row is not set.


I would try to use the debugger to find out.

Helmut

Am 26.06.2019 um 01:20 schrieb mmo...@me.com.INVALID:
I placed a JTable, on a JScrollPane on a JInternalFrame, using the 
default DefaultTableModel.


When I try and load data into the model I get a 
java.lang.NullPointerException.


scriptTable.setValueAt(num, row, 2);

The table is initialized in the constructor method InitComponents.

Any idea what I’m doing wrong?

Best Regards,

Michael