Menu

#13 Update for newer Java versions

open
nobody
None
1
2016-12-23
2015-08-23
Dennis Lee
No

Hi, are you still maintaining this software? Could you update it to make it work better with Java 7 and 8? The newer swing versions doesn't allow transparent background colours on decorated frames.

Discussion

  • Ken Arnold

    Ken Arnold - 2015-08-23

    We haven't been doing so for a while, are you interested in taking a whack at it? I will try to find the time, but I'm not sure when, and I'm happy to have other folks get involved.

     
  • Dennis Lee

    Dennis Lee - 2015-08-23

    Probably yes.
    Also, the documentation is missing (wiki link is dead), so how do I use it?
    I'm getting blank backgrounds somehow, lol.

     
  • Ken Arnold

    Ken Arnold - 2015-08-23

    Sigh, clearly using java.net for the wiki was a bad idea, the wiki is gone and I don't think it can be recovered. However, there are instructions for using custom look and feels for Java on the web, have you tried them? http://stackoverflow.com/questions/9123002/how-to-install-configure-custom-java-look-and-feel looks about right to me.

     
  • Dennis Lee

    Dennis Lee - 2015-08-24

    Hmm. Haven't tried them.
    Anyway I've got the L&F loaded, and got the napkin background and button border, but the font is still the same as system L&F fonts (I didn't specify fonts) and JList and TitileBorder have no border.

    Incompatibility between older Swing releases and the current one, or do I have to create DrawnBorder instances and set fonts myself?

     
  • Luke Usherwood

    Luke Usherwood - 2016-08-08

    I think the top cause of this exception...

    Exception in thread "main" java.awt.IllegalComponentStateException: The frame is decorated
    at java.awt.Frame.setBackground(Frame.java:986)
    at javax.swing.JFrame.frameInit(JFrame.java:259)
    at javax.swing.JFrame.<init>(JFrame.java:181)
    

    ... is actually caused by people being mislead to an ancient version of the jar file, via the project website - and via this message which appears on all the Source Forge download pages:

    Looking for the latest version? Download napkinlaf-alpha001.jar (618.6 kB)

    Presumably there's some Source Forge setting to change this and point these links to the newest 1.2 file rather than the oldest file?

    I currently see 53 downloads per week of the napkinlaf-alpha001.jar file, yet only 3 people/week have succeeded in locating the file they actually want (napkinlaf-1.2.jar inside napkinlaf-jars-1.2.zip) - although possibly some of the others succeeded a different route, like using Maven.

    (Aside: I genuinely find these kinds of statistics interesting, e.g. what sort of percentage of users ever give feedback when they find something wrong vs. immediately give up. I think it helps me think about how my own users behave.)

    And for anyone discovering this post (now that the wiki has gone AWOL -- thanks Oracle!) the path to the L&F you need to specify is: net.sourceforge.napkinlaf.NapkinLookAndFeel

     

Log in to post a comment.

MongoDB Logo MongoDB