Results 1 to 3 of 3
  1. #1
    deemu is offline Member
    Join Date
    Feb 2012
    Posts
    15
    Rep Power
    0

    Default How to align in java

    Can anyone help me to write a code in java applet in eclipse


    For eg: If you have English 1
    Hindi2
    English 4
    Hindi1
    English 2
    Hindi4
    English 3
    Hindi3

    And the answer must be English 1
    English 2
    English 3
    English 4
    Hindi1
    Hindi2
    Hindi3
    Hindi4

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,234
    Rep Power
    7

    Default Re: How to align in java

    You need to sort the data. So you can add each String to an ArrayList. Then you can use the Collections.sort(...) method to sort the data.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default Re: How to align in java

    Cross posted and got the same initial response two hours earlier:
    How to align in java (Beginning Java forum at JavaRanch)

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Align Row to Right in JTable
    By shomid in forum AWT / Swing
    Replies: 2
    Last Post: 11-25-2011, 10:23 PM
  2. JLabel won't left-align
    By gib65 in forum AWT / Swing
    Replies: 6
    Last Post: 07-30-2010, 04:07 PM
  3. Java: How do i align the text in the center?
    By nicacutenica in forum New To Java
    Replies: 5
    Last Post: 06-29-2010, 06:50 PM
  4. Align left
    By britto_bicsjohn in forum AWT / Swing
    Replies: 2
    Last Post: 09-09-2009, 04:05 AM
  5. Right Align columns in JTable
    By Laura Warren in forum New To Java
    Replies: 2
    Last Post: 12-18-2008, 09:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •