• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NX: Anyone make their JTable column widths persitant?

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was toying with the idea of saving column widths on the JTable to the properties file. Im not sure how, I guess extracting the tablecolumnmodel and mucking about with it. Is this overkill?
Oh and another GUI question: When I start the application it pops up some dimple dialogs to ask user to type in path to DB etc etc. Should I design my own panels with BROWSE or are simple standard JOptionPane dialogs enough?
And a third non gui related question: When do you know you have put off submitting long enough and your looking for minor details to occupy you?
 
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Morgan,
I think I'll tackle your third question first.

Originally posted by Morgan Bath:
And a third non gui related question: When do you know you have put off submitting long enough and your looking for minor details to occupy you?


When you start toying with the idea of saving column widths on the JTable to the properties file.
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Morgan,
To answer your first two questions:
1) Yes, it's overkill.
2) A JFileChooser is a really nice way to get the location of the database file from the user. Is it required? Absolutely not, but it is a really nice thing to include for the user in my opinion. There's probably a way of getting a JFileChooser into a JOptionPane (probably as one of the buttons) but if you go for the JFileChooser you're better off creating your own JDialog I think.
 
Morgan Bath
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
K
The dialogs im using are the standard ones opened by static methods. They are one line of code. Making my own dialog frame with filechooser must be quite a few more.......
Im thinking its not worth it. They say in the instructions simple clear code will be preffered over clever efficient code. Or something like that.
[ February 18, 2004: Message edited by: Morgan Bath ]
 
It's a tiny ad only because the water is so cold.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic