mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 22:40:53 +03:00
Extras: FlatInspector: fixed NPE if component class is in default package
This commit is contained in:
@@ -435,7 +435,8 @@ public class FlatInspector
|
|||||||
|
|
||||||
String name = c.getClass().getName();
|
String name = c.getClass().getName();
|
||||||
name = name.substring( name.lastIndexOf( '.' ) + 1 );
|
name = name.substring( name.lastIndexOf( '.' ) + 1 );
|
||||||
appendRow( buf, "Class", name + " (" + c.getClass().getPackage().getName() + ")" );
|
Package pkg = c.getClass().getPackage();
|
||||||
|
appendRow( buf, "Class", name + " (" + (pkg != null ? pkg.getName() : "-") + ")" );
|
||||||
appendRow( buf, "Size", c.getWidth() + ", " + c.getHeight() + " @ " + c.getX() + ", " + c.getY() );
|
appendRow( buf, "Size", c.getWidth() + ", " + c.getHeight() + " @ " + c.getX() + ", " + c.getY() );
|
||||||
|
|
||||||
if( c instanceof Container )
|
if( c instanceof Container )
|
||||||
|
|||||||
Reference in New Issue
Block a user