package jwizardcomponent.example;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import jwizardcomponent.Utilities;
import jwizardcomponent.frame.SimpleJWizardFrame;
import jwizardcomponent.frame.SimpleLogoJWizardFrame;
/**
* Title: JWizardComponent
* Description: Swing-Based Wizard Framework for Wizards
* Copyright (C) 2003 William Ready
*
*
This library is free software; you can redistribute it and/or
*
modify it under the terms of the GNU Lesser General Public
*
License as published by the Free Software Foundation; either
*
version 2.1 of the License, or (at your option) any later version.
*
*
This library is distributed in the hope that it will be useful,
*
but WITHOUT ANY WARRANTY; without even the implied warranty of
*
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
See the GNU Lesser General Public License for more details.
*
*
To receive a copy of the GNU Lesser General Public License
*
write to: The Free Software Foundation, Inc.,
*
59 Temple Place, Suite 330
*
Boston, MA 02111-1307 USA
* @author William Ready
* @version 1.0
*/
public class SimpleLogoJWizard extends SimpleJWizardFrame {
static ImageIcon LOGO;
public static void main(String [] args) {
try {
LOGO =
new ImageIcon("images/logo.jpeg");
SimpleLogoJWizardFrame wizardFrame = new SimpleLogoJWizardFrame(
LOGO);
wizardFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.updateComponentTreeUI(wizardFrame);
wizardFrame.setTitle("Simple Logo JWizardComponent");
wizardFrame.getWizardComponents().addWizardPanel(
new SimpleLabelWizardPanel(wizardFrame.getWizardComponents(),
new JLabel("Yo")));
wizardFrame.getWizardComponents().addWizardPanel(
new SimpleLabelWizardPanel(wizardFrame.getWizardComponents(),
new JLabel("This")));
wizardFrame.getWizardComponents().addWizardPanel(
new SimpleLabelWizardPanel(wizardFrame.getWizardComponents(),
new JLabel("Is")));
wizardFrame.getWizardComponents().addWizardPanel(
new SimpleLabelWizardPanel(wizardFrame.getWizardComponents(),
new JLabel("A")));
wizardFrame.getWizardComponents().addWizardPanel(
new SimpleLabelWizardPanel(wizardFrame.getWizardComponents(),
new JLabel("Test!")));
wizardFrame.setSize(500, 300);
Utilities.centerComponentOnScreen(wizardFrame);
wizardFrame.show();
} catch (Exception e) {
e.printStackTrace();
}
}
}
JWizardComponent.zip( 37 k)