how to adjust alignment for text entered in a jtextfield to right
<p>i want to set the alignment of my text to right actually the fields are related to currency so if it starts form 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>
