[
https://issues.apache.org/jira/browse/NETBEANS-2820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Philip Petrov updated NETBEANS-2820:
------------------------------------
Environment: JDK 12, probably earlier versions too (was: JDK 12)
> JLabel icon not imported correctly on Java with Maven project
> -------------------------------------------------------------
>
> Key: NETBEANS-2820
> URL: https://issues.apache.org/jira/browse/NETBEANS-2820
> Project: NetBeans
> Issue Type: Bug
> Components: apisupport - Maven
> Affects Versions: 9.0, 10.0, 11.0
> Environment: JDK 12, probably earlier versions too
> Reporter: Philip Petrov
> Priority: Minor
> Attachments: netbeans_maven_bug.png
>
>
> # Create new Maven project
> # Add new JFrame form in the default created package
> # Drop a JLabel anywhere in the form
> # Right click the JLabel, click "Properties" and go to the three dots on
> "Icon"
> # Choose "Import to project" and select any image. Import the image to the
> same package
> # Run the project and select the JFrame to be the Main class
> # You will end-up with a NullPointer exception with the stack trace listed
> below:
> {{Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException}}
> {{ at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:217)}}
> {{ at
> com.mycompany.mavenproject1.NewJFrame.initComponents(NewJFrame.java:33)}}
> {{...}}
> That is the jLabel1.setIcon(new javax.swing.ImageIcon(...) call.
> Checking the file structure - the image is correctly placed and existing in
> the SRC folder. It is not related to the file name.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists