Go Back   Java Programming Forums > Java Standard Edition Programming Help > AWT / Java Swing


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 13-03-2010, 12:51 PM
Junior Member
 

Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
venkyInd is on a distinguished road
Default misalignment of list items

Hello All,

My code reads like this. I have used the AWT
Java Code
list l = new List(50, true);
add(list);
--
---

--
for (int i =0; int i < cnt; i++)
l.add( name[i] + "    " + initial[i] + "   " + address[i] +"    "+ .............);
}
My problem is when it displays the list, the items alignment is lost. Each field displays at different location in due to the different sizes of the previous field. like below

johnmichael tester street10
George verky Ganeshmandhir
Ram Goenka location1

Can anyone suggest how to fix the problem.

thanks




Last edited by helloworld922; 16-03-2010 at 05:40 AM.
Reply With Quote Share this thread on Facebook
Sponsored Links
Java Training from DevelopIntelligence
  #2 (permalink)  
Old 15-03-2010, 01:16 AM
copeg's Avatar
Moderator
 
9 Highscores

Join Date: Oct 2009
Posts: 570
Thanks: 7
Thanked 131 Times in 125 Posts
copeg will become famous soon enoughcopeg will become famous soon enough

I'm feeling Sleepy
Default Re: misalignment of list items

If I understand the problem correctly you can display the data in a JTable and the alignment will be specified by the table itself
Reply With Quote
  #3 (permalink)  
Old 15-03-2010, 12:33 PM
Junior Member
 

Join Date: Mar 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
venkyInd is on a distinguished road
Default Re: misalignment of list items

Thanks. will give a try.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] adding items to a binary tree vendetta Algorithms & Recursion 4 27-02-2010 01:32 AM
list in JSP smackdown90 JavaServer Pages: JSP & JSTL 1 09-02-2010 11:58 AM
How to get a sum value from items listed in array ? makarov Loops & Control Statements 0 06-01-2010 10:11 PM
Arrays: question about "removing" items. sanfor Collections and Generics 2 30-11-2009 08:09 AM
How to input items in array jempot Collections and Generics 4 27-01-2009 10:07 AM


100 most searched terms
Search Cloud
2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java addactionlistener addactionlistener java convert double to integer java double format java double to integer in java double to integer java drag en drop programmeren java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double in java format double java get mouse position java java 2d arraylist java actionlistener java double format java double formatting java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programming forum java programming forums java programming practice problems java send keystrokes to another application java two dimensional arraylist java.io.ioexception: premature eof java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton action jbutton actionlistener jtextarea font jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream programming mutators and generics smack api two dimensional arraylist two dimensional arraylist java unable to sendviapost to url what is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

All times are GMT. The time now is 02:04 AM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.