• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

when i change the column positions in jtable,how do i get the changed positions when i re login?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
i am new to java Swing concept.
i want to create a jtable in which i can change the columns positions.
i wnt to get the same positions when i re login.
how can i save the data in the jtable so that i get the same changed positions
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pramod,
Welcome to the Ranch.

Since 1.4 Java provides a preference API.
More details here http://java.sun.com/j2se/1.4.2/docs/guide/lang/preferences.html
You can choose to preserve the column sequence as a preference and use it when you display the table the next time. If your system has multiple users, you can even save the preferences per user.
 
Sheriff
Posts: 22662
127
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Keep an eye on this thread as well. It's about the same problem. In fact, I suspect the two of you are classmates / colleagues.
 
reply
    Bookmark Topic Watch Topic
  • New Topic