I want a textfield which looks like this :
textfield . textfield . textfield. textfield
and to enter just numbers in the textfields. Can you help me, please? :)
I want a textfield which looks like this :
textfield . textfield . textfield. textfield
and to enter just numbers in the textfields. Can you help me, please? :)
You don't need a parent textfield to act as a container for 4 textfields. Place 4 textfields inside a panel.
The steps to achieve this in java swing:
1.Create a JPanel
with a white background.
2.Add 4 JTextField
s seperated by JLabel
with value .
(Use the GridLayout to keep them in a single row).
3.Disable the highlighting of JTextField
s and its border
or make the textfield transparent
4.Instead add a border to the JPanel
when any of the JTextfield
s accepts input.