Mercurial > cgi-bin > hgweb.cgi > JpegWasher
view src/name/blackcap/exifwasher/Main.kt @ 15:959fa9014deb
Add a better comment.
author | David Barts <n5jrn@me.com> |
---|---|
date | Sat, 11 Apr 2020 09:49:00 -0700 |
parents | aafc9c127c7b |
children | 965435b85a69 |
line wrap: on
line source
/* * Entry point, etc. */ package name.blackcap.exifwasher import javax.swing.UIManager import java.util.logging.Level import java.util.logging.Logger object Application { /* name we call ourselves */ val MYNAME = "ExifWasher" /* global UI objects */ var mainFrame: MainFrame by SetOnce<MainFrame>() var settingsDialog: SettingsDialog by SetOnce<SettingsDialog>() fun initialize() { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); mainFrame = MainFrame() /* must be created first */ mainFrame.jMenuBar = MyMenuBar() setMacMenus() /* always safe to call; no-op if not a Mac */ settingsDialog = SettingsDialog() mainFrame.setVisible(true) } } fun main(args: Array<String>) { LOGGER.log(Level.INFO, "beginning execution") if (OS.type == OS.MAC) { System.setProperty("apple.laf.useScreenMenuBar", "true") } inSwingThread { Application.initialize() } }