Frage

Ich schreibe einen Antrag, der die Substanz-Looks und das Gefühl mit einem JColorchooser verbraucht.Das funktioniert gut mit Java 6, aber beim Ausprobieren von Sachen mit Java 7 ist es wirklich nicht jColorchooser's: generasacodicetagpre.

Ich vermute, dass dies mit dem neuen JColorchooser zu tun ist, der in Java 7 eingeführt wird, und diese Substanz ist in irgendeiner Weise an den aktuellen verbunden.Neben dem Schreiben meiner eigenen Farbauswahl ist jedoch ein schöner Weg dieses Themas, von dem jemand weiß?Ich vermute, dass (Hoffnung) Substanz zu gegebener Zeit, um dieses Problem zu lösen, aber ich möchte mit einigen der neuen Funktionen in den frühen Builds von Java 7 herumspielen, bevor es veröffentlicht wird.

Ich vermute irgendwie die Antwort auf das ist nein, aber wenn es irgendwo ein schnelles Fix / Patch gibt (ich konnte keinen finden), wäre es nützlich!

War es hilfreich?

Lösung

This is an interesting study in "Bug Compatibility." If the color is set to null and you try and get the color from the color chooser, a NullPointerException resulted. Kirill expected this and trapped it in a try/catch block. However, in Java 7 they instead return null from that method instead of throwing an NPE.

There are about three snippets of code that need to be changed:

https://github.com/Insubstantial/insubstantial/commit/0f01ae676c6f56d6879862a911ad03caeafabc52

In the next week or so I'm going to publish my first distribution of insubstantial that will include this fix.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top