f



right to left text field

just i want to change the direction of the writing in the text field
to be from right to left. I tried Font.layoutGlyphVector but I don't
know how to set the arguments especailly the first and the second
arguments. Am i in the right way or there is another way? pls help.

0
smarto59 (36)
2/7/2006 4:51:18 AM
comp.lang.java.gui 8286 articles. 0 followers. Post Follow

4 Replies
1115 Views

Similar Articles

[PageSpeed] 57

polaris wrote:
> just i want to change the direction of the writing in the text field
> to be from right to left. I tried Font.layoutGlyphVector but I don't
> know how to set the arguments especailly the first and the second
> arguments. Am i in the right way or there is another way? pls help.
> 

Maybe you have additional requirements, but the setComponentOrientation 
method can be used to set the language-sensitive order of text within 
your text field.

myTextField.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

<http://java.sun.com/j2se/1.5.0/docs/api/java/awt/ComponentOrientation.html>
<http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/text/JTextComponent.html#setComponentOrientation(java.awt.ComponentOrientation)>
<http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Component.html#setComponentOrientation(java.awt.ComponentOrientation)>

Regards,

Roland
0
Roland
2/7/2006 9:21:03 PM
On Tue, 07 Feb 2006 22:21:03 +0100, Roland de Ruiter
<roland.de.ruiter@example.invalid> wrote, quoted or indirectly quoted
someone who said :

>
>myTextField.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

there are 4 orientations in use in real languages out of possible 8.

"I did not know that."
~ Johnny Carson
-- 
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
0
Roedy
2/8/2006 12:06:29 AM
I wonder how could I thank you Mr Ronald :)
Mr Roedy any way thank u thousands of times you are the one how are
replying to all my messages.
Still one more problem: how can I set the default language of my gui to
be in my locale language so I can type in the text field with my
language instead of English language without need to change the
language from the keyboard.
I've tried Locale class but nothing went right.

0
polaris
2/8/2006 5:26:03 AM
On 7 Feb 2006 21:26:03 -0800, "polaris" <smarto59@hotmail.com> wrote,
quoted or indirectly quoted someone who said :

>Still one more problem: how can I set the default language of my gui to
>be in my locale language so I can type in the text field with my
>language instead of English language without need to change the
>language from the keyboard.
>I've tried Locale class but nothing went right.

I answered this recently somewhere else. It appears Sun does not
change the keyboard driver to match the locale. There are good reasons
for that.

My advise is to leave that alone. People can easily swap drivers when
they want to by setting up a hot swap in the control panel.  Doing so
could wreck someone with a special keyboard, DSK etc.

To do it programmatically would require JNI and figuring out how you
hot swap in C.
-- 
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
0
Roedy
2/8/2006 6:55:48 AM
Reply:

Similar Artilces:

Text widget with mixed left-to-right and right-to-left Unicode text abilities?
Hi, is there one of these? If not I might have a go at writing a simple one of them.... Apologies if this is a FAQ, I did search the archive a bit before posting. Best, Charles. ...

what does SHIFT-left-or-right of up-down-left-right do?
Well, I know about shift up-and-down: shift-right ("red" or whatever) up and down on choose-box, HIST, things like that, take the cursor all the way to the beginning or the end. shift-left ("white") on up and down scroll the screen-full up or down (the FIRST such click *stupidly* goes to the final CURRENTLY-ON-SCREEN choice or whatever (meaning TWO double-button-pushes to scroll-down that FIRST time.) What are some of the OTHER possibilities, ie with the left and right arrows? Oh, apparantely undocumented, I've found (via mistaken key-pushes) that RIGHT-arrow will do a SWAP (on stack), and that an UP-arrow gets you into HIST (that HIST is *one nice feature*!) Other tricks with those arrows? Thanks! David David Combs wrote: > Well, I know about shift up-and-down: > > shift-right ("red" or whatever) up and down on > choose-box, HIST, things like that, take the > cursor all the way to the beginning or the end. > > shift-left ("white") on up and down scroll the > screen-full up or down (the FIRST such click > *stupidly* goes to the final CURRENTLY-ON-SCREEN > choice or whatever (meaning TWO double-button-pushes > to scroll-down that FIRST time.) > > > What are some of the OTHER possibilities, ie with the > left and right arrows? > > > Oh, apparantely undocumented,...

does PHP read left to right or right to left?
I've two functions. currentHeadline looks in $_GET for a variable called 'image' and prints what it finds. showThumbnail takes an image for a parameter and resizes it before sending it to the screen. But when I do this: <?php showThumbnail(currentImage(), 20, 20); ?> showThumbnail is telling me that it is not being given a file name, and currentImage is printing the file name to the screen. How is that possible? What is the right way to do this? lawrence k wrote: > I've two functions. currentHeadline looks in $_GET for a variable > called 'image' and pr...

LEFT + LEFT vs LEFT + RIGHT
In order to do a full outer join in MySQL one must use a union. Is there any good reason to do SELECT ... LEFT JOIN UNION SELECT ... RIGHT JOIN rather than SELECT ... LEFT JOIN UNION SELECT ... LEFT JOIN with the tables swapped on the latter LEFT JOIN? Paul Lautman wrote: > In order to do a full outer join in MySQL one must use a union. > Is there any good reason to do > > SELECT ... > LEFT JOIN > > UNION > > SELECT ... > RIGHT JOIN > > rather than > > SELECT ... > LEFT JOIN > > UNION > > SELECT ... > LEFT JOIN > ...

java.lang.ExceptionInInitializerError: java.lang.ArrayIndexOutOfBoundsException
Hi, I am new to DB2. I am getting this error while loading the DB2Driver. I don't have any idea about where i might have gone wrong. please help me. Below is the stack trace. Stack Trace: java.lang.ExceptionInInitializerError: java.lang.ArrayIndexOutOfBoundsException at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv(Native Method) at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:245) at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:130) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) Thanks in advance, Ganesh Majji ganesh.m@gmail.com wrote: > I am new to DB2. I am getting this error while loading the DB2Driver. I > don't have any idea about where i might have gone wrong. please help > me. Unfortunately my crystal bowl stays dark because you didn't mentioned your operating system and which DB2 version you're using. For Windows, *nix and OS/2 please ensure that your application is using the db2java.zip from SQLLIB\java. Check if there are multiple db2jdbc.dll on your system, remove any extra db2jdbc.dll files on the system. Ensure that you can connect to DB2 with the DB2 workstation tools from your machine. sorry for not mentioning the system details. Operation System is SunOS (Solaris) and DB2 SDK 8.2.2 Thank you very much for the kind response, Ganesh Bernd Hohmann wrote: > ganesh.m@gmail...

how to show Latex text string on "static text" field in GUI?
hi folks, how to show Latex text such as "\sigma" symbol on the "static text" field in my GUI? thanks a lot, -Gino gino wrote: <Summary: He wants to display a sigma character in a static text box> I'm not sure you can, at least in R13. (R14 might be different.) Uicontrols such as static text boxes don't seem to support the Interpreter command to allow you specify whether whether characters are interpreted as Tex instructions or literally. In R13, uicontrols seem to interpret all characters literally. Bob Pownall gino wrote on 22 Jul 2004 03:15:...

Right-to-left text
I come back to right-to-left text such as Arabic and Hebrew. (Previous thread was "non-Latin-1 in iCab 3".) My test page http://www.unics.uni-hannover.de/nhtcapri/right-to-left.html lists all HTML and CSS constructs for bidirectional text. It uses only ASCII digits! You do not need to know Arabic or Hebrew; you don't even need fonts with Arabic or Hebrew letters. If your browser passes this test, it is likely to display Arabic and Hebrew pages correctly. ...

Text and Image inside table <td> Alight Text Left and Image right in same cell ??
Is that possible? How? <td > <asp:Label ID="StartDateLabel" runat="server" Text="Start Date:"> <asp:imagebutton ID="Imagebutton1" width=18 Height=18 CommandName=SetDate imageUrl="../cal.jpg" runat=server /> </asp:Label> </td> <td > On 2006-10-24, Jason <jason@cyberpine.com> wrote: > Is that possible? How? Set text-align: left on the cell as usual (it's likely to be the default), and make the image float: right. To work around a Firefox float bug, better to put the image befor...

Changing x-axis plot from right to left to left to right
Hi, For mathematical reasons, I need to change the way that gnuplots my data along the X axis from right to left to left to right (that is, at the minute it plots from 20 down to 1, not from 1 to 20) I am aware of set xrange reverse but this just inverts the whole graph and displays from 17 .... 1 down along the x-axis rather than plotting the other way round. I'm rather stuck and would appreciate some advice. Regards Jamie On 14.08.2012 17:52, Jamie Rees wrote: > For mathematical reasons, I need to change the way that gnuplots my > data along the X axis from right to left to left to right (that is, > at the minute it plots from 20 down to 1, not from 1 to 20) That makes no sense whatsoever. gnuplot generates some kind of picture. It makes absolutely no difference whatsoever whether a line was drawn from left to right or right to left --- it'll be the same line in the end, consisisting of exactly the same pixels being coloured. So since this doesn't make sense, maybe you should tell us what your actual problem is, so we can find out how that might be solved. On Tuesday, August 14, 2012 6:12:33 PM UTC+1, Hans-Bernhard Br=F6ker wrote: > On 14.08.2012 17:52, Jamie Rees wrote: >=20 >=20 >=20 > > For mathematical reasons, I need to change the way that gnuplots my >=20 > > data along the X axis from right to left to left to right (that is, >=20 > > at the minute it plots from...

GUI and events in text field
Hi again, it has been a while since I posted here. I came here a while back when I had a beginner's course in Java and again when I was practicing my Java. I've finally managed to get into a more advanced Java class and I need some guidance. We have to create a GUI that validates some fields. For example, a date field so that everything is numeric and within the right ranges and so on. Can someone please write me one and send it to me? Just Kidding! Actually, I've written the first version of it, but it is not the way I want it to be, hence my question. I want to validate each field as the user finishes typing in that field. If I understood the instructor correctly, that means I have to monitor each keystroke in the field, but this sounds weird. I can see how I can then interrupd and avoid text being entered into a nnumeric field, but I think one should ony verify the field when the user tries to leave it. Now I think I can track that by checking if a field has focus or is losing focus. Am I correct or is there a better way to track a field? Is the event of losing focus something I implement in the ActionListener? Or is it a specific event that I need to listen for? Thanks for all advice. MikeB MikeB wrote: > Hi again, it has been a while since I posted here. I came here a while > back when I had a beginner's course in Java and again when I was > practicing my Java. I've finally managed to get into a more advanced > Java class and I n...

java.lang.Set with elements of type java.lang.Set
Roughly I do something along the lines of: Set set = new HashSet(); Set elem = new HashSet(); set.add(elem); // now we change the elem and add it again to the set elem.add(some object here); set.add(elem); I found out the hard way that 'set' may now contain 'elem' either once or twice, the reason being that 'elem.add()' changes the hashCode of elem such that it is not noticed that it is in 'set' already on the 2nd 'set.add()'. Question: What I would actually want is an IdentityHashSet() set = new IdentityHashSet() but this does not...

to use import java.lang.* or import java.lang.Math or none at all?
Hi guys, i knew that by default all java.lang classes will be imported by the compiler during compilation. but, to make it easier for the computer, should i specify which class i really will be using? does this action will boost the performance during compilation and runtime or not a matter at all? the answer to this post will definitely affect my programming style in the future when i'm considering "to import or not to import"... hmm,,, thanks in advance. JPractitioner wrote: > i knew that by default all java.lang classes will be imported by the > compiler during compilation. but, to make it easier for the computer, > should i specify which class i really will be using? does this action > will boost the performance during compilation and runtime or not a > matter at all? Whether and how you import classes has exactly zero effect at runtime. Imports (with or without wildcards) are only a kind of abbreviation provided by the compiler to save us the effort of typing in fully-qualified type names every time. In theory explicit importing should make compilation faster -- by a very tiny amount. I've never heard anyone claim that they've even managed to measure a difference let alone found a case where it made a practical difference. So the question comes down to how to write your code for maximum clarity. One school of thought asserts that you should always import each class explicitly (rather than by a wildcard). There's a fai...

right-to-left text entry
I am modifying an application that uses OpenMotif 2.2.3 on Red Hat EL 3.0 I need to allow a user to enter text into a single line text entry field in right-to-left order (for Arabic input). Is this at all possible? Is there any documentation anywhere about it? I have scoured Google, to no avail. I have tried playing with a verification callback on the text entry widget, but can't seem to get the cursor to behave in a sensible fashion. Please, can anyone help? Thanks. ...

How to have left and right aligned text on same line?
Hi, I wish to have text both left and right aligned on the same line. This is so appropriate bits of text will fall under either of a pair of images floated left and right. I have tried something like: CSS file: span.right {text-align: right} HTML file: <p> The Isle of Man, where I was born and grew up. <span class="right">Canada, where I choose to live.</span> </p> but it doesn't appear to work. I guess this is because 'text-align' applies to block containers, and so to the whole paragraph (not p...

text box orientation right to left
Hi, I am new to java. Am creating a math webpage for teachers. I have math problems where the input needs to be right to left (e.g. adding two multi-digit numbers in a column). Is there an easy way to specify that the caret position needs to move from right to left instead of the standard left to right? kd "kd dolezal/rob nishida" <kddran.6.26.83@verizon.net> wrote in message news:<QGtgd.926$vJ.799@trnddc02>... > Hi, > > I am new to java. Am creating a math webpage for teachers. I have math > problems where the input needs to be right to left (e....

GUI, how can I fill an text field.
Hi, I designed a GUI with guide and now I want to fill up the fields during the calculation. I do not understand it with the handles and how I can attach a variable with such a field. An easy to understand example would be very helpful. Thx a lot Hideki You have to use get and set-commands: get(handles.my_textfield,'String') will return the text in the field "my_textfield". If you want to write into the field: set(handles.my_textfield,'String','blabla'); or textstring = 'blabla'; set(handles.my_textfield,'String',textstring); Good luck...

Right to left writing in text widget
Hi Everybody, I have a request concerning to typing text right to left in a text widget. I have no idea how to solve this problem. Is there anybody hwo has an answer? With the Best: Zsolt -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to majordomo@lists.stanford.edu ...

Help with an editable text field in GUI
Hi everybody! I've developed a graphical user interface that contains a couple of editable text fields, and both of them have defined the same callback routine which is only executed in order to check the introduced parameters. When the user introduces incorrect parameters, an error dialog box is displayed with an error message. In my case, when the incorrect parameter corresponds to first editable text field, the error dialog box is correctly displayed, but the (mouse) cursor has move to the second editable text field and I'd like to force it for not moving till the first parameter i...

Updating GUI text field from function
Hi, I've got a nearest neighbour algorithm that calculates pixel intensities from a known sample. Because it can take a while I'm trying to get a Static Text box to display the percentage completed. However, it only seems to display the percentage when it's complete. Is there a way to update this text box every time the percentage is calculated? Thanks in advance. Cameron Smith wrote: > Hi, > > I've got a nearest neighbour algorithm that calculates pixel > intensities from a known sample. Because it can take a while I'm > trying to get a Static Text box to...

Error occurred during intialization of VM java/lang/NoClassDefFoundError: java/lang/Object
Good day to all, I have installed the j2se/netbeans binary bundle on red hat 9. I can run everything perfectly as root but when I try to compile with any other user I get: Error occurred during intialization of VM java/lang/NoClassDefFoundError: java/lang/Object When I saw this it seemed like a permissions problem but I checked the permissions and everything seemed fine. All users have execute permissions of javac and java. I have read other threads dealing with the same or similar problem but have not reached any solution yet. I would appreciate if anyone that has run into this type of problem and has solved it if he/she could give me a hand or if anyone could just point out what I should be looking for in this type of problem. Thanks in advance... gek ...

Learn about Gui.Lang.Java in series
In this website to learn more about Java and web Combination of Asp. 1. How to connect Java to web { xml,JavaScript}. 2. How to connect Asp to Web {xml,Ado.net,J2ee} The connection and web config is very important to Java and web with using Asp Dot Net. If you want connections more Information below links http://freejavaprogbooks.blogspot.com http://learnaboutweb.blogspot.com http://ganesh-freedotnetbooks1.blogspot.com On Jul 26, 12:22=A0am, Gani <ganeshkumar...@gmail.com> wrote: > In this website ... =2E.. What? ...

how to let the text align to the left and right
well, I am writing my Acknowledgements for my thesis work, and at last, I will write the date and my name, like (let xxx represents the text) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx. Frankfurt, May 02 Bill Gates the "Frankfurt, May 02 should be at the very left side", and "Bill Gates" should be at the very right side, how? Am 2 May 2007 02:12:28 -0700 schrieb hallohallo2002@hotmail.com: > well, I am writing my Acknowledgements for my thesis work, and at > last, I will write the date and my name, like (let xxx represents the > text) > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > xxxxxxxxxxxxxxxx. > > Frankfurt, May 02 Bill Gates > > the "Frankfurt, May 02 should be at the very left side", and "Bill > Gates" should be at the very right side, how? \noindent Frankfurt \hfill Bill -- Ulrike Fischer hallohallo2002@hotmail.com writes: > Frankfurt, May 02 Bill Gates > > the "Frankfurt, May 02 should be at the very left side", and "Bill > Gates" should be at the very right side, how? \hfill: --8<---------------cut here---------------start------------->8--- \documentclass{article} \begin{document} Frankfurt, M...

Equation with right or left flushed text
I want to have some "standard" equations, possible within gather or similar environments, with centered formula bodies but want to have a zero width box containing text at the extreme left. For example I would like output to look like this: Einstein's Formula E = mc^2 (23) where (23) is the equation number, E=mc^2 is centered (or positioned as it should be within given environment) without regard to widths of Einstein's Formula or (23). \shoveleft seems only to go back to the left most part of series of equations rather than the left margin. Any suggestions or help gratefully appreciated. ds david.mrlucky.schwartz@gmail.com wrote: > I want to have some "standard" equations, possible within gather or > similar environments, with centered formula bodies but want to have a > zero width box containing text at the extreme left. For example I > would like output to look like this: > > Einstein's Formula E = mc^2 (23) > > where (23) is the equation number, E=mc^2 is centered (or positioned > as it should be within given environment) without regard to widths of > Einstein's Formula or (23). \shoveleft seems only to go back to the > left most part of series of equations rather than the left margin. > > Any suggestions or help gratefully appreciated. ds \begin{flalign} \text{Einstein's Formula} & E &= mc^2 && \end{flalign} untested /daleif ...

CheckBox in Column of JTable: Exception: java.lang.String cannot be cast to java.lang.Boolean
Hello, I have discovered a hidden error. My project was working for awhile, but then I started to get the below error. My error comes from the fact that I'm using a checkbox in a jtable, and I'm using the below "getColumnClass". Thank you, compile: run: Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at javax.swing.JTable$BooleanRenderer.getTableCellRendererComponent(JTable.java:5412) at javax.swing.JTable.prepareRenderer(JTable.java:5735) at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2114) at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:2016) at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1812) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at javax.swing.JComponent.paintComponent(JComponent.java:778) at javax.swing.JComponent.paint(JComponent.java:1054) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5221) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1482) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1413) at javax.swing.RepaintManager.paint(RepaintManager.java:1206) at javax.swing.JComponent._paintImmediately(JComponent.java:5169) at javax.swing.JComponent.paintImmediately(JComponent.java:4980) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:770) at javax.swing.RepaintM...

Web resources about - right to left text field - comp.lang.java.gui

GOP Head Asks Both Sides to Reduce Violence at Trump Rallies
The head of the Republican Party is condemning the violence that broke out Friday at a Donald Trump rally in Chicago, calling on both sides to ...

Iraqi officials say Islamic State chemical attacks kill child, wound 600
Los Angeles Times Iraqi officials say Islamic State chemical attacks kill child, wound 600 Los Angeles Times Islamic State has launched two ...

Why daylight saving time can be bad for your health
fox13now.com Why daylight saving time can be bad for your health fox13now.com Daylight saving time is Sunday, and losing sleep after clocks ...

Google’s AlphaGo Has Won Its Third Match Against Go World Champion Lee Sedol
For the third time, Google’s AlphaGo has beaten Lee Sedol, the human world champion of Go. The win is an incredible demonstration of the artificial ...

New York tugboat crash leaves 1 dead, 2 missing
CNN New York tugboat crash leaves 1 dead, 2 missing CNN (CNN) A tugboat struck a construction barge on the Hudson River near New York's Tappan ...

North Korea Submarine Missing As Large Scale US And South Korea Military Drills Continue
A North Korean submarine operating off North Korea’s east coast has gone missing. Three senior officials revealed that U.S. aircraft, ships and ...

Two Officials Stabbed as Unrest at Alabama Prison Leads to Lockdown
NBCNews.com Two Officials Stabbed as Unrest at Alabama Prison Leads to Lockdown NBCNews.com The only prison in Alabama that carries out executions ...

Dog Whisperer Investigated For Alleged Pig Baiting
The “Dog Whisperer” Cesar Millan is being investigated for animal cruelty. A segment from his popular TV show on Nat Geo WILD caused public uproar ...

The Latest: 2nd Escaped New Mexico Inmate Still on the Loose
Authorities continued Saturday to search for the second of two convicts who escaped from a fortified transport van in New Mexico

Wounded Warrior Project Fires Two Executives
. . . after CBS News uncovered wasteful spending in the organization

Resources last updated: 3/13/2016 1:21:03 AM