-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
screemer
committed
Mar 13, 2019
1 parent
e0cb41b
commit ba2ab6c
Showing
7 changed files
with
1,265 additions
and
640 deletions.
There are no files selected for viewing
126 changes: 67 additions & 59 deletions
126
src/main/java/io/github/autobleem/abcoveredit/Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,67 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package io.github.autobleem.abcoveredit; | ||
|
||
import io.github.autobleem.abcoveredit.ui.MainEditor; | ||
import java.awt.Dimension; | ||
import java.awt.Toolkit; | ||
import javax.swing.JFrame; | ||
|
||
/** | ||
* | ||
* @author artur.jakubowicz | ||
*/ | ||
public class Application { | ||
|
||
/** | ||
* @param args the command line arguments | ||
*/ | ||
public static void main(String[] args) { | ||
/* 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 ex) { | ||
java.util.logging.Logger.getLogger(MainEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | ||
} catch (InstantiationException ex) { | ||
java.util.logging.Logger.getLogger(MainEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | ||
} catch (IllegalAccessException ex) { | ||
java.util.logging.Logger.getLogger(MainEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | ||
} catch (javax.swing.UnsupportedLookAndFeelException ex) { | ||
java.util.logging.Logger.getLogger(MainEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | ||
} | ||
//</editor-fold> | ||
|
||
/* Create and display the form */ | ||
java.awt.EventQueue.invokeLater(new Runnable() { | ||
public void run() { | ||
JFrame frame = new MainEditor(); | ||
frame.setTitle("AutoBleem Cover Editor"); | ||
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); | ||
frame.setLocation(dim.width / 2 - frame.getSize().width / 2, dim.height / 2 - frame.getSize().height / 2); | ||
frame.setResizable(false); | ||
frame.setVisible(true); | ||
} | ||
}); | ||
} | ||
|
||
} | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package io.github.autobleem.abcoveredit; | ||
|
||
import io.github.autobleem.abcoveredit.ui.MainEditor; | ||
import java.awt.Dimension; | ||
import java.awt.Toolkit; | ||
import java.net.URL; | ||
import javax.swing.ImageIcon; | ||
import javax.swing.JFrame; | ||
|
||
/** | ||
* | ||
* @author artur.jakubowicz | ||
*/ | ||
public class Application { | ||
|
||
/** | ||
* @param args the command line arguments | ||
*/ | ||
public static void main(String[] args) { | ||
/* 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 ex) { | ||
java.util.logging.Logger.getLogger(MainEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | ||
} catch (InstantiationException ex) { | ||
java.util.logging.Logger.getLogger(MainEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | ||
} catch (IllegalAccessException ex) { | ||
java.util.logging.Logger.getLogger(MainEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | ||
} catch (javax.swing.UnsupportedLookAndFeelException ex) { | ||
java.util.logging.Logger.getLogger(MainEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); | ||
} | ||
//</editor-fold> | ||
|
||
/* Create and display the form */ | ||
java.awt.EventQueue.invokeLater(new Runnable() { | ||
public void run() { | ||
JFrame frame = new MainEditor(); | ||
frame.setTitle("AutoBleem Cover Editor"); | ||
|
||
URL iconURL = getClass().getResource("/io/github/autobleem/ablogo1.png"); | ||
// iconURL is null when not found | ||
ImageIcon icon = new ImageIcon(iconURL); | ||
frame.setIconImage(icon.getImage()); | ||
|
||
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); | ||
frame.setLocation(dim.width / 2 - frame.getSize().width / 2, dim.height / 2 - frame.getSize().height / 2); | ||
frame.setResizable(false); | ||
frame.setVisible(true); | ||
} | ||
}); | ||
} | ||
|
||
} |
Oops, something went wrong.