mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
SwingX: fixed NullPointerException in FlatCaret when using org.jdesktop.swingx.prompt.PromptSupport.setPrompt() on a text field and then switching theme
This commit is contained in:
@@ -98,6 +98,9 @@ FlatLaf Change Log
|
|||||||
color. (issue #409)
|
color. (issue #409)
|
||||||
- InternalFrame: Fill background to avoid that parent may shine through internal
|
- InternalFrame: Fill background to avoid that parent may shine through internal
|
||||||
frame if it contains non-opaque components. (better fix for issue #274)
|
frame if it contains non-opaque components. (better fix for issue #274)
|
||||||
|
- SwingX: Fixed `NullPointerException` in `FlatCaret` when using
|
||||||
|
`org.jdesktop.swingx.prompt.PromptSupport.setPrompt()` on a text field and
|
||||||
|
then switching theme.
|
||||||
|
|
||||||
|
|
||||||
## 1.6.5
|
## 1.6.5
|
||||||
|
|||||||
@@ -101,6 +101,9 @@ public class FlatCaret
|
|||||||
// adds selection highlights to the text component highlighter
|
// adds selection highlights to the text component highlighter
|
||||||
if( isSelectionVisible() ) {
|
if( isSelectionVisible() ) {
|
||||||
EventQueue.invokeLater( () -> {
|
EventQueue.invokeLater( () -> {
|
||||||
|
if( getComponent() == null )
|
||||||
|
return; // was deinstalled
|
||||||
|
|
||||||
if( isSelectionVisible() ) {
|
if( isSelectionVisible() ) {
|
||||||
setSelectionVisible( false );
|
setSelectionVisible( false );
|
||||||
setSelectionVisible( true );
|
setSelectionVisible( true );
|
||||||
@@ -253,6 +256,9 @@ public class FlatCaret
|
|||||||
// select all
|
// select all
|
||||||
if( c instanceof JFormattedTextField ) {
|
if( c instanceof JFormattedTextField ) {
|
||||||
EventQueue.invokeLater( () -> {
|
EventQueue.invokeLater( () -> {
|
||||||
|
if( getComponent() == null )
|
||||||
|
return; // was deinstalled
|
||||||
|
|
||||||
select( 0, doc.getLength() );
|
select( 0, doc.getLength() );
|
||||||
} );
|
} );
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user