I'm trying to add JTextField
to JToolBar
and it works, but it is too long. I need it to take only 3 letters.
Here is the screenshot of it now...
I tried following methods,
JTextField field = new JextField(3); // thought this limits to three characters.
And I tried,
field.setColumns(3); // this didn't work either.
The default layout of a tool-bar respects the maximum size set for a text field.