title: How to adjust alignment to right for a text entered in the JTextField
body: <p>I want to set the alignment of my text to right. Actually the fields are related to currency so if it starts from right, it will look good.</p>
  
  <pre><code>PreparedStatement stmt1 = con.prepareStatement("select sum(tv)as totalsum from mut_det WHERE rm_id = ?");
              ResultSet rs1;
              String rm1 = tf_rm_id.getText().trim();
              stmt1.setInt(1, Integer.parseInt(rm1));
              rs1 = stmt1.executeQuery();
              while (rs1.next()) {
                  String text = rs1.getString("totalsum");
                  tf_rsfig.setText(text);
  
              }
  </code></pre>