Simple Modal Logo Wizard : Wizard « Swing Components « Java

Java
1. 2D Graphics GUI
2. 3D
3. Advanced Graphics
4. Ant
5. Apache Common
6. Chart
7. Class
8. Collections Data Structure
9. Data Type
10. Database SQL JDBC
11. Design Pattern
12. Development Class
13. EJB3
14. Email
15. Event
16. File Input Output
17. Game
18. Generics
19. GWT
20. Hibernate
21. I18N
22. J2EE
23. J2ME
24. JDK 6
25. JNDI LDAP
26. JPA
27. JSP
28. JSTL
29. Language Basics
30. Network Protocol
31. PDF RTF
32. Reflection
33. Regular Expressions
34. Scripting
35. Security
36. Servlets
37. Spring
38. Swing Components
39. Swing JFC
40. SWT JFace Eclipse
41. Threads
42. Tiny Application
43. Velocity
44. Web Services SOA
45. XML
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java » Swing Components » WizardScreenshots 
Simple Modal Logo Wizard
Simple Modal Logo Wizard
 

package jwizardcomponent.example;

import java.awt.BorderLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.WindowConstants;

import jwizardcomponent.Utilities;
import jwizardcomponent.dialog.*;

/**
 * <p>Title: JWizardComponent</p>
 * <p>Description: Swing-Based Wizard Framework for Wizards</p>
 * <p>Copyright (C) 2003 William Ready
 *
 * <br>This library is free software; you can redistribute it and/or
 * <br>modify it under the terms of the GNU Lesser General Public
 * <br>License as published by the Free Software Foundation; either
 * <br>version 2.1 of the License, or (at your option) any later version.
 *
 * <br>This library is distributed in the hope that it will be useful,
 * <br>but WITHOUT ANY WARRANTY; without even the implied warranty of
 * <br>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * <br>See the GNU Lesser General Public License for more details.
 *
 * <br>To receive a copy of the GNU Lesser General Public License
 * <br>write to:  The Free Software Foundation, Inc.,
 * <br>59 Temple Place, Suite 330
 * <br>Boston, MA 02111-1307 USA</p>
 *
 @author Jens Kutschke, jens.kutschke@j-dimension.com, http://www.j-dimension.com
 *
 @version 1.0
 */

public class SimpleModalLogoJWizard {
    
    static ImageIcon LOGO;
    
    public static void main(String [] args) {
        try {
            
            // optional: set a look and feel
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            
            // create a new frame or use an existing one of your application
            final JFrame mainWindow=new JFrame("Simple demo of a modal wizard with a logo icon.");
            mainWindow.getContentPane().setLayout(new BorderLayout());
            mainWindow.getContentPane().add("North"new JLabel("Click the button to get a modal wizard dialog for this JFrame.", JLabel.CENTER));
            
            // in this example, we use a button to open a new wizard
            JButton dialogButton=new JButton("open modal wizard");
            dialogButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent e) {
                    
                    // create the modal wizard: the constructor takes the parent frame
                    SimpleLogoJWizardDialog wizardDialog = new SimpleLogoJWizardDialog(mainWindow, LOGO, true);
                    
                    SwingUtilities.updateComponentTreeUI(wizardDialog);
                    wizardDialog.setTitle("Simple Logo JWizardComponent");
                    
                    // add panels to the wizard
                    wizardDialog.getWizardComponents().addWizardPanel(
                    new SimpleLabelWizardPanel(wizardDialog.getWizardComponents(),
                    new JLabel("This")));
                    wizardDialog.getWizardComponents().addWizardPanel(
                    new SimpleLabelWizardPanel(wizardDialog.getWizardComponents(),
                    new JLabel("is")));
                    wizardDialog.getWizardComponents().addWizardPanel(
                    new SimpleLabelWizardPanel(wizardDialog.getWizardComponents(),
                    new JLabel("a")));
                    wizardDialog.getWizardComponents().addWizardPanel(
                    new SimpleLabelWizardPanel(wizardDialog.getWizardComponents(),
                    new JLabel("modal")));
                    wizardDialog.getWizardComponents().addWizardPanel(
                    new SimpleLabelWizardPanel(wizardDialog.getWizardComponents(),
                    new JLabel("wizard!")));
                    wizardDialog.setSize(500300);
                    wizardDialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
                    Utilities.centerComponentOnScreen(wizardDialog);
                    
                    // show the wizard
                    wizardDialog.show();
                }
            });
            mainWindow.getContentPane().add("South", dialogButton);
            mainWindow.setSize(400,  100);
            mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            
            LOGO =
            new ImageIcon("images/logo.jpeg");
            
            // show the frame
            mainWindow.show();
            
        catch (Exception e) {
            e.printStackTrace();
        }
    }
    
}

           
         
  
JWizardComponent.zip( 37 k)
Related examples in the same category
1. Swing Wizard component from yuvraj_sawant(at)persistent.co.in
2. Swing Wizard component with source code
3. Wizard Dialog with LogoWizard Dialog with Logo
4. Dynamic Wizard DialogDynamic Wizard Dialog
5. Simple Dynamic Logo WizardSimple Dynamic Logo Wizard
6. Simple Dynamic WizardSimple Dynamic Wizard
7. Simple Wizard
8. A dialog that presents the user with a sequence of steps for completing a task.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.