4 Replies Latest reply: Mar 4, 2010 9:37 PM by DarrylBurke RSS

    wrong alignment in java.awt.List in hebrew enabled windows

    843807
      i have a list component in my application. when i run it in a hebrew anabled windows 98, all list items are aligned to the right (they are all english strings). i don't seem to find a way to overcome this. i have tried : "setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);" but it doesn't seem to work.
      do you think you can help?
      thanks
        • 1. Re: wrong alignment in java.awt.List in hebrew enabled windows
          843807
          Merav, Send a small test program, Frame + Panel +List, I will try it. i also use hebrew anabled windows 98.

          Toda, Noah
          • 2. Re: wrong alignment in java.awt.List in hebrew enabled windows
            843807
            Try to run this program and LMK what you have.
            import java.awt.*;
            import java.awt.event.*;
            
            public class ListA extends Frame 
            {
                 Panel  pan  = new Panel();
                  
            public ListA()
            {
                 addWindowListener(new WindowAdapter() 
                {     public void windowClosing(WindowEvent ev) 
                      {     dispose();
                           System.exit(0);}});
                       
                  setBounds(10,10,240,290);
                 add(pan,BorderLayout.CENTER);
                 pan.setLayout(null);
                  List jl = new List();
                 for (int i = 0; i < 10; i++)
                 {
                      jl.add("babs 1 ");
                      jl.add("ada 2");
                      jl.add("grag d");
                 }
                 jl.setBounds(30,30,100,210);
                 pan.add(jl);
            
                 setVisible(true);
            }
             
            public static void main (String[] args)  
            {
                 new ListA();
            }
            }
            Noah
            • 3. Re: wrong alignment in java.awt.List in hebrew enabled windows
              843807
              hi .. i have the same problem of alignment with java.awt.List ...i use Arabic texts and don't know how to align to the right

              for example: in html i have to use align = "right" with texts
              <Div align="right"> &#1605;&#1585;&#1581;&#1576;&#1575; </Div>


              i hope if anyone can help !!
              • 4. Re: wrong alignment in java.awt.List in hebrew enabled windows
                DarrylBurke
                saidhn, welcome to the forum. Please don't post in threads that are long dead. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.

                I'm locking this thread now.

                db