diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-07-03 16:02:37 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-07-03 16:02:37 +0200 |
commit | 4bf64a03463219c19c091f2ed297e23e8fd812ec (patch) | |
tree | c68c805cb8333a48301447e2f6777fe7cdf3c26c /src/lombok/installer/InstallerWindow.java | |
parent | cf594564bed778fe4d73f32ae5865cf20290f360 (diff) | |
download | lombok-4bf64a03463219c19c091f2ed297e23e8fd812ec.tar.gz lombok-4bf64a03463219c19c091f2ed297e23e8fd812ec.tar.bz2 lombok-4bf64a03463219c19c091f2ed297e23e8fd812ec.zip |
A start on the installer.
Diffstat (limited to 'src/lombok/installer/InstallerWindow.java')
-rw-r--r-- | src/lombok/installer/InstallerWindow.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/lombok/installer/InstallerWindow.java b/src/lombok/installer/InstallerWindow.java new file mode 100644 index 00000000..7db465be --- /dev/null +++ b/src/lombok/installer/InstallerWindow.java @@ -0,0 +1,48 @@ +package lombok.installer; + +import java.awt.BorderLayout; + +import javax.swing.ImageIcon; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.SwingUtilities; + +import lombok.core.Version; + +public class InstallerWindow { + private JFrame jFrame; + private JLabel mainText; + private JLabel leftGraphic, topGraphic; + + public static void main(String[] args) { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + new InstallerWindow().show(); + } + }); + } + + public InstallerWindow() { + jFrame = new JFrame(String.format("Project Lombok v%s - Installer", Version.getVersion())); + + //We want to offer an undo feature when the user cancels in the middle of an operation. + jFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + + leftGraphic = new JLabel(new ImageIcon(InstallerWindow.class.getResource("/lombok/installer/lombok.png"))); + topGraphic = new JLabel(new ImageIcon(InstallerWindow.class.getResource("/lombok/installer/lombokText.png"))); + mainText = new JLabel("Explanatory stuff goes here."); + + jFrame.setLayout(new BorderLayout()); + jFrame.add(leftGraphic, BorderLayout.WEST); + jFrame.add(topGraphic, BorderLayout.NORTH); + jFrame.add(mainText, BorderLayout.CENTER); + + + jFrame.pack(); + System.out.println("WE SHOULD BE UP"); + } + + public void show() { + jFrame.setVisible(true); + } +} |