I have created a calculator in applet using awt. I got a problem in textfield as when you type, textfield displays from left to right but calculator displays from right to left. So what should i do so that textfield should print from right.
posted 8 years ago
You can pad whatever you want to display with spaces on the left side. If you use a monospaced font (like Courier) then the width taken up by a space character is the same as the width of any digit. So if you want to display a 5-digit number, you'd prepend 20 spaces to it (assuming your TextField is 25 characters wide).
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads