You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Philip Petrov (JIRA)" <ji...@apache.org> on 2019/07/10 14:19:01 UTC

[jira] [Updated] (NETBEANS-2820) Importing JLabel icon on Maven project is not copying the image to the target directory

     [ https://issues.apache.org/jira/browse/NETBEANS-2820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Petrov updated NETBEANS-2820:
------------------------------------
    Summary: Importing JLabel icon on Maven project is not copying the image to the target directory  (was: JLabel icon not imported correctly on Java with Maven project)

> Importing JLabel icon on Maven project is not copying the image to the target directory
> ---------------------------------------------------------------------------------------
>
>                 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: Trivial
>         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 inside the related package subdirectory. The image is also visualized correctly in the Netbeans editor itself. It is also not related to the file name (bug is available with simple filenames too).
> The issue is that Netbeans does NOT copy the image file into the "target" directory. If I copy the file manually, it all works fine.
> This happens only on Maven project.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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