Click here to Skip to main content
15,917,455 members
Home / Discussions / Java
   

Java

 
AnswerRe: Java Heap Space problem Pin
Arrpita6-May-10 16:17
Arrpita6-May-10 16:17 
GeneralRe: Java Heap Space problem(solved) Pin
002comp7-May-10 2:16
002comp7-May-10 2:16 
GeneralRe: Java Heap Space problem(solved) Pin
Arrpita7-May-10 15:40
Arrpita7-May-10 15:40 
QuestionHow to update Group and User in JBPM4.3 Pin
sinron3-May-10 16:14
sinron3-May-10 16:14 
QuestionTo ask about right allignment in a calc. Pin
Arrpita30-Apr-10 16:10
Arrpita30-Apr-10 16:10 
AnswerRe: To ask about right allignment in a calc. Pin
TorstenH.6-May-10 0:54
TorstenH.6-May-10 0:54 
GeneralRe: To ask about right allignment in a calc. Pin
Arrpita6-May-10 15:55
Arrpita6-May-10 15:55 
GeneralRe: To ask about right allignment in a calc. Pin
TorstenH.11-May-10 21:54
TorstenH.11-May-10 21:54 
this shouldn't be a matter of alignment, this is a general problem. Also there is an

The TextField uses Strings, your input is an int-Value or float. Using the + Operator within this environment is risky. Also is there an hierachy of those operator-actions:
Hierachy of Operators @ princeton.edu

If you want to concat an certain string to another, no matter if the Value of the String is a number or not, always use String.concat()

in your given example:
JTextField tf=new JTextField("0");
tf.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

String strText = tf.getText();

String strNewText = strText.concat(strText, ".0");
tf.setText(strNewText);


and just in case:
you know, there are far better ways to give a number a certain format:

NumberFormat in Java doc @ sun.com



greets
Torsten
I never finish anyth...

GeneralRe: To ask about right allignment in a calc.(solved) Pin
Arrpita12-May-10 16:19
Arrpita12-May-10 16:19 
Questionvoip project Pin
sam_dheol28-Apr-10 20:57
sam_dheol28-Apr-10 20:57 
AnswerRe: voip project Pin
Peter_in_278028-Apr-10 21:03
professionalPeter_in_278028-Apr-10 21:03 
AnswerRe: voip project Pin
Richard MacCutchan28-Apr-10 22:31
mveRichard MacCutchan28-Apr-10 22:31 
Questionconverting file data to string Pin
002comp27-Apr-10 23:54
002comp27-Apr-10 23:54 
AnswerRe: converting file data to string Pin
002comp28-Apr-10 1:54
002comp28-Apr-10 1:54 
GeneralRe: converting file data to string Pin
jwhite928-Apr-10 2:44
jwhite928-Apr-10 2:44 
GeneralRe: converting file data to string Pin
002comp28-Apr-10 18:07
002comp28-Apr-10 18:07 
GeneralRe: converting file data to string Pin
David Skelly28-Apr-10 22:27
David Skelly28-Apr-10 22:27 
GeneralRe: converting file data to string(Solved) Pin
002comp28-Apr-10 23:24
002comp28-Apr-10 23:24 
QuestionJson -> java object Pin
Evgeni5723-Apr-10 9:37
Evgeni5723-Apr-10 9:37 
AnswerRe: Json -> java object Pin
TorstenH.6-May-10 0:56
TorstenH.6-May-10 0:56 
QuestionVPN project tips?? Pin
Strategic_Thinker20-Apr-10 6:41
Strategic_Thinker20-Apr-10 6:41 
AnswerRe: VPN project tips?? Pin
Richard MacCutchan20-Apr-10 11:06
mveRichard MacCutchan20-Apr-10 11:06 
GeneralRe: VPN project tips?? Pin
Strategic_Thinker22-Apr-10 4:12
Strategic_Thinker22-Apr-10 4:12 
GeneralRe: VPN project tips?? Pin
Richard MacCutchan22-Apr-10 5:51
mveRichard MacCutchan22-Apr-10 5:51 
GeneralRe: VPN project tips?? Pin
Paul Conrad22-Apr-10 6:21
professionalPaul Conrad22-Apr-10 6:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.