private JTextField resultTextField = new JTextField("0");
resultTextField.setFont(textFieldFont);
resultTextField.setBounds(COMMON_X, COMMON_Y, 180, 50);
resultTextField.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
add(resultTextField);
I have created a JTextField as above.My application consists of number buttons and '.'. When I click on number buttons they get appended right (i.e. "5" on 5 click and then "52" on 2 click). But on clicking the '.' button the expected result is "5." but the it is displayed as ".5" and then on clicking "2" , "5.2" is displayed. Where could I be going wrong?