?
Solved

displaying in a label from right to left....

Posted on 2000-01-13
1
Medium Priority
?
195 Views
Last Modified: 2010-04-01
I'd like to get the code to display a text in a label from right to left..
ie when a button is pressed the character shud be entred from right..
when i press a delete button it shud delete the character by character from left...
0
Comment
Question by:jeetuvasudev
1 Comment
 

Accepted Solution

by:
comerm earned 20 total points
ID: 2349695

For insert:

label.setText(label.getText().concat(instr))

This will add any character(s) in instr to the RIGHT of the text.

For delete:

label.setText(label.getText().substring(1))

This will remove the character on the LEFT.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month4 days, 21 hours left to enroll

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question