Example #1
0
 public static void main(String[] args) {
   // Schedule a job for the event-dispatching thread:
   // creating and showing this application's GUI.
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           createAndShowGUI();
         }
       });
 }
Example #2
0
 private void initColumnWidths(final JTable table) {
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           table.getColumnModel().getColumn(0).setMaxWidth(100);
           table.getColumnModel().getColumn(1).setPreferredWidth(150);
           //                table.getColumnModel().getColumn(2).setPreferredWidth(5);
           //                table.getColumnModel().getColumn(3).setPreferredWidth(5);
           //                table.getColumnModel().getColumn(4).setPreferredWidth(5);
           //                table.getColumnModel().getColumn(5).setPreferredWidth(5);
           table.getColumnModel().getColumn(7).setPreferredWidth(175);
         }
       });
 }