# Doubt on Numeric text field

**URL:** <https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [May 20, 2022, 10:57am UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829 "2022-05-20T10:57:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amal\_Kottoor1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Amal\_Kottoor1](https://forum.inductiveautomation.com/u/Amal_Kottoor1)\
**Post date:** [May 20, 2022, 10:57am UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/1 "2022-05-20T10:57:20Z")

</div>

Hi Guys, I am not an expert in Ignition/Java first off all, but had a quick doubt on numeric text field. In an old post I saw that we could access the underlying component (JTable) of a Power Table to do some higher level of functionality via java. This was done using the function getTable().

Similarly, is there an underlying component for numeric text field, if yes then how can I access it and what all java libraries do I have to import to do so. Thanks in Advance

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 20, 2022, 11:25am UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/2 "2022-05-20T11:25:05Z")

</div>

Welcome to the forum!

1. _Vision_ or _Perspective_? (Edit your post and add the relevant tag. It will attract the relevant experts as well as being important for the actual answers.)
2. Ignition can most likely do what you need without requiring library magic. What is the actual problem you’re trying to solve? You mention Numeric Text Field and then Power Table. Which is it?

---

<div class="post-metadata">

**Author:** ![Amal\_Kottoor1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Amal\_Kottoor1](https://forum.inductiveautomation.com/u/Amal_Kottoor1)\
**Post date:** [May 20, 2022, 11:31am UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/3 "2022-05-20T11:31:38Z")

</div>

I am working with numeric text field in Vision.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 20, 2022, 12:18pm UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/4 "2022-05-20T12:18:46Z")

</div>

You don't have to import anything. It _ **is** _ a java component that subclasses standard Swing stuff.

Start here:

> [@Find all component properties available](https://forum.inductiveautomation.com/t/find-all-component-properties-available/28100):
>
> We have a general question -how to find properties on components that are not in the Ignition Property Editor? -how to navigate through Java documentation to find all the properties available? Example: Event script that do “select all” for the Selected Label in a DropDown. This script working after a lot googling and trying. myComboBox = event.source.parent.getComponent (‘Dropdown Charge’) myComboBox. getEditor (). selectAll ();

Then look here:

[https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.1/com/inductiveautomation/factorypmi/application/components/PMINumericTextField.html](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.1/com/inductiveautomation/factorypmi/application/components/PMINumericTextField.html)

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [May 20, 2022, 12:53pm UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/5 "2022-05-20T12:53:57Z")

</div>

Check out the introspect function @pturmel linked to, it is very useful. You can use plain old `dir` but the introspect gives you a bit more context.

If you don’t know how to examine components, the way I like to do it is via script console.

Open up the window that has the component in question in designer, then open script console. Then you can do

```auto
window = system.gui.getWindow("Some Window")
rc = window.getRootContainer()
someComponent = rc.getComponent("some container").getComponent("some component")
# now you can do 
result = shared.instrospect(someComponent)
print result
# or with dir
for thing in dir(someComponent):
    print thing

```

---

<div class="post-metadata">

**Author:** ![Amal\_Kottoor1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Amal\_Kottoor1](https://forum.inductiveautomation.com/u/Amal_Kottoor1)\
**Post date:** [May 21, 2022, 11:19am UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/6 "2022-05-21T11:19:02Z")

</div>

Thanks guys, this was exactly what I was looking for, also @pturmel I have gone through the introspect function, its really a neat and handy thing . Let me go through the docs, will post if something comes up. Thanks.

---

<div class="post-metadata">

**Author:** ![Amal\_Kottoor1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Amal\_Kottoor1](https://forum.inductiveautomation.com/u/Amal_Kottoor1)\
**Post date:** [May 23, 2022, 6:56am UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/7 "2022-05-23T06:56:11Z")

</div>

One quick doubt guys, PMINumericTextField is inheriting a method called removeActionListener() form JTextField. So will I be able to use this method, to not to listen to any mouse click events. If so how can I access the underlying PMINumericTextField from Numeric Text Field in ignition(like using getTable() for getting JTable from Power Table).

Can you guys provide me a sample code snippet or something, as I am having little difficulty with coding in Java. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [May 23, 2022, 12:07pm UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/8 "2022-05-23T12:07:42Z")

</div>

I don’t think you should ever have to remoteActionListener via script. I think that’s probably what goes on in the background if you had an `onClick` event and then get rid of the whole script - then behind the scenes it’s removing the actionListener. If you never set up an action, there’s nothing to remove.

What is it you are trying to do/accomplish?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 23, 2022, 12:12pm UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/9 "2022-05-23T12:12:01Z")

</div>

> [@Amal\_Kottoor1](#):
>
> is inheriting a method called

This means that PMINumericTextField _ **IS** _ a JTextField. That's what inheritance means. The inheriting class can change functionality in methods to support whatever functionality it added. Those would show up in the docs as defined again in the outer class.

Note that a Power Table is _ **NOT** _ a JTable--it uses composition, not inheritance. So the JTable is nested and the Power Table provides a convenience function to get to it.

---

<div class="post-metadata">

**Author:** ![Amal\_Kottoor1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Amal\_Kottoor1](https://forum.inductiveautomation.com/u/Amal_Kottoor1)\
**Post date:** [May 23, 2022, 5:35pm UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/10 "2022-05-23T17:35:18Z")

</div>

@bkarabinchak.psi, so basically I have few Numeric Text Fields in a window which are showing some values from PLC. Although I kept the Numeric Text Field Editable option to be false, when I double click in the Numeric Text Field its highlighting as if we double click the content on a normal text field. Also I believe focus is randomly shifting between the Numeric Text Fields. I can take care of the focus issue, but couldn’t handle the issue mentioned first. Although its not any process stopping issue, I don’t this to come back to be at sometime after we deploy the backup.

---

<div class="post-metadata">

**Author:** ![Amal\_Kottoor1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Amal\_Kottoor1](https://forum.inductiveautomation.com/u/Amal_Kottoor1)\
**Post date:** [May 23, 2022, 5:38pm UTC](https://forum.inductiveautomation.com/t/doubt-on-numeric-text-field/59829/11 "2022-05-23T17:38:47Z")

</div>

Understood @pturmel, thanks a lot for making things clear. Will go through it to have a better idea.
