1) Why does everytime I press TAB key on JTextArea, the cursor
doesn't move to next focusable component? Can I fix this problem?
What method should I use?
2) If I have this code :
JTextField myText = new JTextField(15)
I thought myText can only accept 15 character, but I was wrong. Can I
make myText to receive only 15 chars, so after I typed 15 chars, the
16th char won't be displayed?
3) Is it possible to create a textfield that receives only numeric? I
try to use JFormattedTextField :
DecimalFormat formatter = new DecimalFormat("##########");
JFormattedTextField numericText = new JFormattedTextField(formatter);
numericText.setColumns(10);
But when I type "012345", it becomes "12345". I still need the "0". I
tried to use different formatter :
DecimalFormat formatter = new DecimalFormat("0000000000");
but when I type "012345" again, it becomes "0000012345". I don't need
the first 4 "0".
Can anybody help me with this one?
4). About JButton. Can I create a JButton which its caption displayed
in 2 (or more) rows?
This code :
JButton myButton = new JButton("1st row\n2nd row");
didn't recognize the line separator, so the caption is "1st
row2ndrow".