Welcome to Dream.In.Code
Become a Java Expert!

Join 150,051 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,713 people online right now. Registration is fast and FREE... Join Now!




Problem in java

 
Reply to this topicStart new topic

Problem in java, JList

susmitha
14 Jun, 2008 - 04:10 AM
Post #1

New D.I.C Head
*

Joined: 14 Jun, 2008
Posts: 2

HI ,

How to change the orientation of JList ,,,,
i want my list to be displayed in horizontal direction...

please help me out its very urgent...
CODE

    JList controlButtons = new JList(buttons); // buttons is an array of imageicons.
               controlButtons.setLayoutOrientation(JList.VERTICAL_WRAP);    
             JToolBar toolBar = new JToolBar();    
           toolBar.add(controlButtons);


i am unable to allign my icons horizontally........
wink2.gif
User is offlineProfile CardPM
+Quote Post

mensahero
RE: Problem In Java
14 Jun, 2008 - 10:34 AM
Post #2

c0mput3rz Are Only Human
Group Icon

Joined: 26 May, 2008
Posts: 664



Thanked: 17 times
Dream Kudos: 75
My Contributions
CODE

controlButtons.setLayoutOrientation(JList.VERTICAL_WRAP);


I think list are made to be vertical. I mean that's there purpose.
Well I'm guessing if there's a method like JList.HORIZONTAL_WRAP , then that should do the trick.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 10:14PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month