awesome!
thanks for posting how you solved it, since this is often not done these
days.
-mbien
On 28.06.22 20:32, Mike Hallan wrote:
Got it working. Don't do step 3) that I described because adding the
dependencies as per step 4) will already include the relevant classes.
On Monday, June 27, 2022, 10:32:09 PM GMT+3, Mike Hallan
<[email protected]> wrote:
Neil,
I tried what you said and I'm still having issues. Hopefully something
simple perhaps you could please clarify, probably in step 4) below.
Here's what I did:
1) I took out the code that I initially showed in Installer.
2) I set the LAF through Branding.
Specifically, r-click on NB platform app node, chose Branding... and
under Resource Bundles tab set
org/netbeans/swing/plaf/Bundle.properties
LookAndFeelClassName=com.formdev.flatlaf.FlatLightLaf and left
LookAndFeelCustomsClassName = default.
3) Added to my module as Wrapped JARs:
org-netbeans-libs-flatlaf-RELEASE140.jar
org-netbeans-swing-laf-flatlaf-RELEASE140.jar
4) In this same module, in Module Dependencies I added:
"Flaflaf"
"FlatLaf Look and Feel"
After clean, build & run, I get:
WARNING [org.netbeans.ProxyClassLoader]: Will not load class
org.netbeans.swing.laf.flatlaf.ui.FlatToolbarDragger arbitrarily from
one of ModuleCL@3341a4db[org.netbeans.swing.laf.flatlaf] and
ModuleCL@3af30783[module1.test.com] starting from SystemClassLoader[76
modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
INFO [org.netbeans.core.windows.view.ui.toolbars.ToolbarContainer]
java.lang.ClassNotFoundException: Will not load class
org.netbeans.swing.laf.flatlaf.ui.FlatToolbarDragger arbitrarily from
one of ModuleCL@3341a4db[org.netbeans.swing.laf.flatlaf] and
ModuleCL@3af30783[module1.test.com] starting from SystemClassLoader[76
modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
at org.netbeans.ProxyClassLoader.doFindClass(ProxyClassLoader.java:191)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:125)
at
org.netbeans.ModuleManager$SystemClassLoader.loadClass(ModuleManager.java:769)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[catch] at
org.netbeans.core.windows.view.ui.toolbars.ToolbarContainer.createDragger(ToolbarContainer.java:260)
at
org.netbeans.core.windows.view.ui.toolbars.ToolbarContainer.addNotify(ToolbarContainer.java:147)
at java.awt.Container.addNotify(Container.java:2776)
at javax.swing.JComponent.addNotify(JComponent.java:4740)
at java.awt.Container.addNotify(Container.java:2776)
Do I need to add some code to explicitly load a class in Installer?
Thanks for your help!
On Monday, June 27, 2022, 04:12:59 PM GMT+3, Neil C Smith
<[email protected]> wrote:
Hi,
On Mon, 27 Jun 2022 at 08:35, Mike Hallan <[email protected]>
wrote:
> I managed to load FlatLAF in Installer module (my code shown below)
Firstly, don't do this. We changed the IDE default look and feel to
FlatLaf, not the platform itself. Do the change the same way the IDE
does, ie. by branding it.
Changes in the IDE - https://github.com/apache/netbeans/pull/3332
Similar in a platform app -
https://github.com/praxis-live/praxis-live/blob/master/branding/modules/org-netbeans-swing-plaf.jar/org/netbeans/swing/plaf/Bundle.properties
> I did see in https://search.maven.org/search?q=flatlaf that there
exist two NB-specific flatlaf jars:
org-netbeans-libs-flatlaf-RELEASE140.jar and
org-netbeans-swing-laf-flatlaf-RELEASE140.jar (don't what to do with
these, if anything. I assume I shouldn't use them, although when I did
add as a wrapped jar then the additional tab for 'FlatLAF' appeared in
LAF settings, although empty)
You need both of those modules. And you also need one of *your*
modules to depend on org.netbeans.swing.laf.flatlaf to get it loaded.
The module with the customs is autoload, which it probably shouldn't
be!
Best wishes,
Neil
---------------------------------------------------------------------
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