Skip to content

Commit

Permalink
native laf
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Oct 13, 2014
1 parent 5275904 commit 3185f27
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions src/de/mpg/molgen/buczek/portifix/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import javax.swing.JPopupMenu;
import javax.swing.SwingUtilities;
import javax.swing.TransferHandler;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableCellRenderer;
Expand Down Expand Up @@ -148,7 +150,7 @@ private void saveThis() {
tableModel.setNewDateThis(jTable1.convertRowIndexToModel(selected[i]), d);
}
} catch (ParseException exception) {
exception.printStackTrace();
// invalid date string. keep old values
}
}

Expand All @@ -162,7 +164,7 @@ private void saveAll() {
tableModel.setNewDateAll(jTable1.convertRowIndexToModel(selected[i]), d);
}
} catch (ParseException exception) {
exception.printStackTrace();
// invalid date string. keep old values
}
}

Expand Down Expand Up @@ -442,25 +444,11 @@ private void jButton_saveallActionPerformed(java.awt.event.ActionEvent evt) {//G
*/
public static void main(String args[]) throws SQLException {

// DriverManager.registerDriver(new org.firebirdsql.jdbc.FBDriver());
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Gui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
// if we fail to set the system look and feel, we continue with the default
}
//</editor-fold>

//</editor-fold>

/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
Expand Down

0 comments on commit 3185f27

Please sign in to comment.