Forum Stats

  • 3,767,858 Users
  • 2,252,726 Discussions
  • 7,874,366 Comments

Discussions

JScrollPane with scroll bar on the left

2»

Comments

  • 843805
    843805 Member Posts: 49,999
    scroll.setComponentOrientation( ComponentOrientation.RIGHT_TO_LEFT);
    Demo code on 1.5.
    Works fine for me on XP.
    public class T
    {
    	public static void main(String [] args )
    	{
    		javax.swing.JScrollPane  jScrollPane1 = new 
    				javax.swing.JScrollPane( new javax.swing.JTree() );	
    		jScrollPane1.setComponentOrientation(
                    java.awt.ComponentOrientation.RIGHT_TO_LEFT);
    		javax.swing.JFrame f=new javax.swing.JFrame();
    		f.getContentPane().add(   jScrollPane1 );
    		f.setVisible( true );
    	}
    }
This discussion has been closed.