Results 1 to 3 of 3
  1. #1
    mitsukai is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default Help with java.swing.Jlist

    hi im making a program which needs to have a list in a box of some description with the contents taken from an object as strings where the order can be changed with buttons linked to another method for reordering the strings in the object. im currently using the Jlist but i cant find a mehtod to update the order of the list.
    cheers

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default

    You could use a DefaultListModel and remove an item and add it at the required index, or you implement a custom ListModel that allows ordering.

  3. #3
    mitsukai is offline Member
    Join Date
    Apr 2009
    Posts
    2
    Rep Power
    0

    Default

    cheers ill hav a go at that but what im reallyaiming for is a box that enables the user to reorder the box but also reoder in the object im using. i also need to be able to select an object and delete it with simple windows commands and keystrokes

Similar Threads

  1. [swing] Java and sql
    By ezee in forum AWT / Swing
    Replies: 1
    Last Post: 03-27-2009, 06:55 PM
  2. Java JList Alignment Question?
    By antitru5t in forum New To Java
    Replies: 1
    Last Post: 03-10-2009, 07:44 PM
  3. GUI Designer for Swing/Java
    By balajishenbagarajan in forum AWT / Swing
    Replies: 20
    Last Post: 01-27-2009, 01:17 AM
  4. Java Swing
    By RAMYA in forum New To Java
    Replies: 3
    Last Post: 11-12-2008, 08:00 AM
  5. Java Swing
    By JavaBean in forum Java Tutorial
    Replies: 0
    Last Post: 09-22-2007, 09:08 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
  •