Continuing in the direction of improving the development experience inside the Codename One simulator, we have made another batch of small improvements this week. Notably, we’ve added support for “Inspect Component”, which is similar to the “Inspect Element” feature available in Chrome. Now, if you right-click on a component in the simulator, it will provide you with a context menu.
If you select the “Inspect Component” option in this menu, it will select the selected component in the “Components” panel, and in the “Component details”.
The “Component Inspector” has been available as part of the simulator for a long time, but selecting a particular component used to require you to expand the component tree nodes manually until you found the component you were looking for.
The simulator would help you a little bit by placing a translucent red highlight over the currently selected node’s corresponding component, but it could still be a little bit tedious to have to manually walk through the tree to find the component you wanted.
You’ll notice also, that the “Component Details” will automatically populate with the details of your selected component. Most for the fields in the component details form are read only, but the UIID field can be edited, allowing you to experiment with different styles for your elements directly in the simulator.