Skip to content

Java Desktop (JavaFX and Swing) Component Inspector on mouse over

License

Notifications You must be signed in to change notification settings

TangoraBox/ComponentInspector

Repository files navigation

Java Desktop (JavaFX and Swing) Component Inspector

A Tool for help you to inspect the location and some properties (see features section) of the component under mouse, in a window hierarchy

License: LGPL v3 Build Status Quality Gate Status

Features

  • CSS class name in javafx node components css-class
  • Field name of component declaration in parent (when possible) css-class
  • The inspected component is highlighted (since v1.1.0)

Usage

The inspector window is only shown if you hold down the CONTROL key when you move the mouse


Example Demo

Example Demo

ScreenShots

JavaFX Component Inspector

FXInspector

Swing Component Inspector

FXInspector

Swing inside JavaFX

FXInspector

JavaFX inside Swing

FXInspector


How to use

Simple, one line of code to handle all:

Java FX Example

Add this line in the public void start(Stage primaryStage) of your main JavaFX class that extends Application:

FXComponentInspectorHandler.handleAll();

Swing Example

Add this line in the public static void main(String[] args) of your application launch class:

SwingComponentInspectorHandler.handleAll();

Library import with Maven

The artifacts have been published to maven central:

FXComponentInspector

Java 11+

<dependency>
    <groupId>com.tangorabox</groupId>
    <artifactId>component-inspector-fx</artifactId>
    <version>1.1.0</version>
</dependency>

Java 8

<dependency>
    <groupId>com.tangorabox</groupId>
    <artifactId>component-inspector-fx</artifactId>
    <version>1.1.0-java8</version>
</dependency>

SwingComponentInspector

Java 11+

<dependency>
    <groupId>com.tangorabox</groupId>
    <artifactId>component-inspector-swing</artifactId>
    <version>1.1.0</version>
</dependency>

Java 8

<dependency>
    <groupId>com.tangorabox</groupId>
    <artifactId>component-inspector-swing</artifactId>
    <version>1.1.0-java8</version>
</dependency>

Contributing

If you want to contribute to upgrade this project with new features or fixing bugs, you're welcome, please make a pull request.


Team

GaRzY
GaRzY
github.com/garzy

Support

Reach out to me at one of the following places!


License

License: LGPL v3