• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: Anyone make their JTable column widths persitant?

 
Morgan Bath
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • 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?
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic