LIMIT THE CHARACTERS IN A EDITABLE JCOMBOBOX

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

LIMIT THE CHARACTERS IN A EDITABLE JCOMBOBOX

TONO2
Please,

I have designed an editable ComboBox and I need to limit the number of characters.

Thank you




Reply | Threaded
Open this post in threaded view
|

Re: LIMIT THE CHARACTERS IN A EDITABLE JCOMBOBOX

JPDIST
Hi,
I think one solution is to limit the number of characters when you obtain them (by sql or others methods)It's what I do.

Amicalement

Jean-Pierre Distinguin


----- Mail original -----
De: "TONO2" <[hidden email]>
À: [hidden email]
Envoyé: Lundi 27 Novembre 2017 23:46:37
Objet: [nbusers] LIMIT THE CHARACTERS IN A EDITABLE JCOMBOBOX

Please,

I have designed an editable ComboBox and I need to limit the number of characters.

Thank you




Reply | Threaded
Open this post in threaded view
|

Re: LIMIT THE CHARACTERS IN A EDITABLE JCOMBOBOX

Eduard Karel de Jong
Googling gives this:
<https://stackoverflow.com/questions/40943529/how-to-set-the-max-text-limit-in-jcombobox-using-netbeans>

Looking for limiting text in a JTextField gives
<https://stackoverflow.com/questions/3519151/how-to-limit-the-number-of-characters-in-jtextfield>
One of the answers here shows how to intercept  input to count and
restrict input characters one at a time.

Between these two inputs, I think, you may be able to find a solution.

Cheers
Eduard

[hidden email] wrote:

> Hi,
> I think one solution is to limit the number of characters when you obtain them (by sql or others methods)It's what I do.
>
> Amicalement
>
> Jean-Pierre Distinguin
>
>
> ----- Mail original -----
> De: "TONO2"<[hidden email]>
> À: [hidden email]
> Envoyé: Lundi 27 Novembre 2017 23:46:37
> Objet: [nbusers] LIMIT THE CHARACTERS IN A EDITABLE JCOMBOBOX
>
> Please,
>
> I have designed an editable ComboBox and I need to limit the number of characters.
>
> Thank you
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: LIMIT THE CHARACTERS IN A EDITABLE JCOMBOBOX

Eduard
Googling gives this:
<https://stackoverflow.com/questions/40943529/how-to-set-the-max-text-limit-in-jcombobox-using-netbeans>


Looking for limiting text in a JTextField gives
<https://stackoverflow.com/questions/3519151/how-to-limit-the-number-of-characters-in-jtextfield>

One of the answers here shows how to intercept  input to count and
restrict input characters one at a time.

Between these two inputs, I think, you may be able to find a solution.

Cheers
Eduard

[hidden email] wrote:

> Hi,
> I think one solution is to limit the number of characters when you obtain them (by sql or others methods)It's what I do.
>
>
> Amicalement
>
> Jean-Pierre Distinguin
>
>
> ----- Mail original -----
> De: "TONO2"<[hidden email]>
> À: [hidden email]
> Envoyé: Lundi 27 Novembre 2017 23:46:37
> Objet: [nbusers] LIMIT THE CHARACTERS IN A EDITABLE JCOMBOBOX
>
> Please,
>
> I have designed an editable ComboBox and I need to limit the number of characters.
>
>
> Thank you
>
>
>
>
>